Override Projection Lines Color

Hey Everyone,

 

First off, I love Dynamo. After AU2014 I jumped in and have used it daily since.

 

I had a question on the override element color in view node. IS it possible to make it override annotation’s projection lines? I’m still pretty new but am learning a lot!

 

Thanks!

John

2014-12-17_16h09_33

I’m assuming I better learn me some Python scripting? Also, I really like the new 0.75 release candidate. Thanks for all of your hard work everyone!

We managed to get it figured out! The node is now live on the Rhythm package.

http://sixtysecondrevit.blogspot.com/2015/03/rhythm-for-dynamo-update.html

 

Hi John- were you able to target overriding elements on sheets? We are looking to adjust the viewport crop graphics and found there is now object style way to target that edge. The only way is to double-click into the viewport on the sheet, select the crop view edge on the view, right click, then override the graphics in view. I tried your component but it doesn’t seem to be working. We have hundreds of interior elevations to adjust so to do this manually would take forever! I’ve attached my working dynamo file that targets 1 sheet but I was hoping to eventually be able to batch process multiple sheets simultaneously. The ideal situation would be having control over the projection line weight, line pattern, and line color. Any thoughts?

[caption id=“attachment_33014” align=“alignleft” width=“500”]20151116-Capture This is just a test screen shot showing the manual process of overriding the projection lines per viewport. Ideally, it would be possible to batch process these to whatever color/weight desired.[/caption]

>Download Dynamo File here…<

This workflow is actually something I have had on the back burner for a year now! :smiley: We need this exact same functionality for view ports but I have no clue how to apply it for all of them. I’ve even asked some of the API masters in here as well. It seems pretty undo able right now, but I will investigate further.

 

 

That would be awesome John! I think that Dynamo is exciting because there is so much time that will get picked up by optimizing the production/documentation side of Architecture. This is just one of those little details that drives you crazy. Do you have a link to the Revit API? I’m interested in dipping my toes into coding and it would be great to know how to appropriately call the Revit’s library of elements.

Hi Tim, I think its achievable. There is a method in API called “View.SetElementOverrides” have a look at that mean while i will try to find a solution for you. I have attached below Revit API file link. Game on:-D

Revit API file https://yadi.sk/d/2STpcT2EkWL4f

Revit Developer Guide: http://help.autodesk.com/view/RVT/2016/ENU/?guid=GUID-F0A122E0-E556-4D0D-9D0F-7E72A9315A42
Hi Kulkul,

Thanks for jumping on this! Yah it’s one of those items that seems to have fallen in the cracks of development but will save some serious time if we can resolve here. By the way, the link you provided is to something in a different language I’m unfamiliar with. I’ve included what I found through the Autodesk website for propsective developers. I’ll look more into it when time allows. Let us know if you find anything to solve the override! Cheers!

Here’s where I was able to get with it. It looks like John’s node just needs an added for each loop that you can pipe in the elevations views to. Its getting close.

 

So Danny, you are saying there needs to be a change to the python code? Or have you been able to get it to work for your testing sheet?

Tim, the issue is John’s node is an override in active view node, if the python code could be tweaked to replaced the active with the actual elevation, seems like it could work. Also, I had a heck of a time figuring out what needed to be overridden, it turns out you’re actually overriding the ElevationMarker but I can’t find any way with the API to select the ElevationMarker based on the elevation hence all the nodes in my graph.

Hi Danny, So if I understand you correctly, you are saying the graphic edge of the elevation view (highlighted below in yellow) has it’s information stored in the elevation marker (seen in plan highlighted red)? The specific thing is the crop boundary edge displaying on the sheet hoping to target (again yellow)…

If that is in fact the case, my thought would be to somehow target the specific arrow head on the elevation marker because that is what hyperlinks to the specific elevation. In our case the ‘Detail Number’ is directly associated with the view itself as well as a specific View Template set up for interior elevations. To target all views it looks like the arrowhead and placed elevation on sheet are 1 and the same. So I don’t see why overriding parameters to the view element doesn’t work…

… My other thought would be to just grab the viewport on the sheet, extract the boundaries, then simply make a copy rectangle boundary curve over the top on the sheet as detail lines. I haven’t tested this out but sounds simple enough. If the viewport moves, either re-run the script or have people know to select and move detail lines with viewport.

The devil is in the details… man alive.

I’m liking this discussion. Hopefully we can get something going on this! My interiors Revit users will lose their minds!

Success!!! The only thing is you have to have the crop view turned on before you run the script. In the script I tried getting it to first turn them on and then override them but couldn’t get it to work. It had no problems turning them on but then as it ran through the script it acted like they didn’t exist. Anyhow, for some reason I can’t upload right now but here is the newly needed python code for the end of the tree. I’ll post the dyn file when it allows me to. #Created by DPS Design, dpsdesign.org import clr clr.AddReference(‘ProtoGeometry’) from Autodesk.DesignScript.Geometry import * # Import ToDSType(bool) extension method clr.AddReference(“RevitNodes”) import Revit clr.ImportExtensions(Revit.Elements) # Import DocumentManager and TransactionManager clr.AddReference(“RevitServices”) import RevitServices from RevitServices.Persistence import DocumentManager from RevitServices.Transactions import TransactionManager from System.Collections.Generic import * # Import RevitAPI clr.AddReference(“RevitAPI”) import Autodesk doc = DocumentManager.Instance.CurrentDBDocument uiapp = DocumentManager.Instance.CurrentUIApplication app = uiapp.Application #The inputs to this node will be stored as a list in the IN variable. dataEnteringNode = IN #unwrap all elements to use with API elements = [] views = UnwrapElement(IN[2]) for i in IN[0]: elements.append(UnwrapElement(i)) #create graphic overrides properties gSettings = Autodesk.Revit.DB.OverrideGraphicSettings() #set Projection Line weight gSettings.SetProjectionLineWeight(IN[1]) # “Start” the transaction TransactionManager.Instance.EnsureInTransaction(doc) #apply lineweight override to elements in an input list for i, j in zip(elements, views): id = i.Id j.SetElementOverrides(id, gSettings) # “End” the transaction TransactionManager.Instance.TransactionTaskDone() #Assign your output to the OUT variable OUT = IN[0]

This is exciting! Where does the collector.elements in view come from?

Danny, I can post this workflow on Rhythm if you want. I will leave credit in the code if that’s cool! email me if you want sixtysecondrevit@gmail.com

John, that node is part of the SpringNodes package. Let me know if you need anything else!

Tim, I’m running everything through John at this point to post a fancy node. Hopefully he’ll have more time than I will next week!

This is exciting! I’ve been swamped trying to tie of a DD packaged deadline and simply had to go without this breakthrough unfortunately. Our planning people discovered to do my suggested method of drawing thick detail lines to clean up their edges and delete 1 side if a window/exterior wall. Can I assume that ‘running everything through John’ means this functionality will be included in an updated release of the Rhythm package? I appreciate you guys sinking your teeth into this one and getting it working! Let me know when things are ready. Cheers!

I’m looking to get this rolled in to Rhythm on Monday morning! Stay tuned.