lunedì, giugno 30, 2014

Hatch To Room Macro Update


Here's a little improvement to this macro I've been asked recently by a reader of the blog that allows you to get rid of the overlapping lines, at the moment it works only with straight lines though.
Actually the whole idea came to me still while I was developing a macro to optimize floor sketches, something close to what the overkill command does in AutoCAD for those of you that are familiar with this functionality.
What I've been able to accomplish is to check if a pair of curves derived from the hatch boundaries in the CAD file are collinear, overlapping (partially or completely one on top of the other) or joined by one end. If so, the macro creates a new curve (actually a straight line) that can be used in Revit instead, without any warnings showing up.
To achieve that I've used a method that checks for intersections between curves. Unfortunatly it works fine for straight lines but not so well for arcs, I'm still on this particular issue since this method gives you an intersection between arcs that shares the same center point and radius even if they don't actually meet.

You can find the code here and if you're happy with it you can show me some gratitude Paying What You Want on Paypal at:

puntorevit@gmail.com

giovedì, giugno 26, 2014

Auto Wall Schedule WIP - Code Sharing




For those of you who are interested in the code of the macro, you can find it here.
If you need a blank rvt file with all the tags I've used to run a "test drive" use this one.
For any questions, please  leave a comment below or contact me via email. if you are happy with my code you can show me some gratitude and PayWhatYouWant via PayPal at: 

puntorevit@gmail.com

martedì, giugno 24, 2014

Auto Wall Schedule - Views on Sheet




At this point I'm able to place the views created with the macro on a sheet accordingly to the type mark of each sample.
There is yet a lot to do to handle all the exceptions though. I'm concerned about the customization needed for each project when the title block has to change.
The material schedule on the right pane can be placed automatically and the family type of the main wall tag can be picked using the function parameter of the wall but still, it needs to be checked by the user.
As you can see from the video some material tag is filled with the correct value but the majority of them don't, I couldn't figure out why this is happening.

Any suggestion is really appreciated.

The floor macro is ready too as it has a very similar behavior to the wall one.

lunedì, giugno 23, 2014

Auto Wall Schedule Macro - Work in progress



I've been developing a macro during the past week to automate some tedious tasks such as the wall types / floor types documentation.
I'm sharing a work in progress of the macro that shows how it works:

  1. for each type in the project creates a sample and gives a type mark
  2. creates a section view across the width of the sample
  3. places a number of tags in the view (category tags, material tags)
  4. creates parts and dimensions for each layer and for the overall width of the sample
There are a few things that I would like to address: material tags don't update correctly, there's still need for the user intervention even if it takes just a couple of nudges up and down, it shouldn't be necessary though; I wish I could use keynote material tags but it seems to be impossible to create Keynotes via API, somehow I've found a way to copy the Keynote values in the project to the material mark but there's need to select a keynote tag (it could be any user keynote, even with a random value) to trigger the process, so it's not a solution even if it gets the job done because it won't update automatically.
In addition to these tasks I'm thinking of placing the views automatically on sheets.
An interesting thing I learned this time is about a property of the geometry options, in fact I was struggling to obtain the references of the planar faces of the parts retrieved from the samples as solids.
If ComputeReferences is set to true in the geometry options it's possible to retrieve a valid reference that can be added to the ReferenceArray to be used to create dimensions.

Updates to follow, auto floor schedule too.

If anyone is interested in seeing the code as it is right now, please contact me at puntorevit@gmail.com

mercoledì, giugno 18, 2014

Workset Check Macro


With this macro is possible to check how many objects are on each user workset in the central file.
Object type definitions are not taken into account. This way is possible to know if a workset is empty and can be deleted or for some reason it contains any objects when it shouldn't.

Here's the macro, if you are happy with my code you can show me some gratitude and PayWhatYouWant via PayPal at:

puntorevit@gmail.com

venerdì, giugno 06, 2014

Wall Unjoin macro



Here's a really useful macro to unjoin both ends of all the walls in the project that have the Comments field equal to "unjoin".

Here's the macro, if you're happy with my code you can Pay What You Want on PayPal to:

puntorevit@gmail.com

martedì, giugno 03, 2014

Auto Floor Maker 2 External Command - 2015 update





Here's the update for Revit 2015 of this add-in I wrote to create finish floors and thresholds starting from a selection of rooms and doors.
Here's the zipped file containing the .dll and the .addin manifest, they have to be copied to this path:

C:\ProgramData\Autodesk\Revit\Addins\2015

If you're happy with my code, please Pay What You Want via PayPal to:

puntorevit@gmail.com

lunedì, giugno 02, 2014

Fire Rating Lines 2015 - Update



Here's an update of the macro for Revit 2015 containing also comments in the code to change the behavior of the tagging part.
For the record, I had to change just a line of code (2014 release should work anyway but I've updated the code just in case).

Here's the source code and here's the tag family. In order to make the macro work the family tag needs to be loaded in the project before you try to run the macro, just like in the previous version.

For those who are interested here's the new line of code, Family.Symbols has been deprecated so:

FamilySymbol tagtype=doc.GetElement(firetag.GetFamilySymbolIds().FirstOrDefault()) as FamilySymbol;

If you're happy with my code, please Pay What You Want via PayPal to:

puntorevit@gmail.com