I am looking to hide/uncheck layers in a linked CAD file within a view like a Drafting View. There is documentation on how to change line colors, etc but I am having trouble pin pointing a way to simply hide a layer in a view via Dynamo/API. To shortcut initial steps I can use @Thomas_Mahon Bimorph Nodes to obtain all CAD Links and their Layer names. The Bimorph CAD.SetObjectStyle does not include an option for turning off a layer by name. Is there a way through the API or functionality in the Bimorph nodes that allows me to do so?
Thatās fantastic, just for my curiosity (and perhaps in the meantime), would you mind helping me do it with Python?
I believe I need the sub-category of the import instance, but I canāt find much in the API to get methods for these? Dir didnāt give me a visibility or hide⦠I had a try with SetCategoryHidden and the import instance class tells me:
To hide or unhide an element, use the Hide() and Unhide() method of [View ]
Hi @edanastas i thought it would, since a VT is just a view from Revits perspective, however it throws an exceptionā¦so no! Iāll look into this before release.
EDIT: Yes, it works, there was an exception occurring within my test file. Simply pass you view template in as the view and it will work without issue.
I copied my code from C# then redacted it and missed that⦠so you need to remove the Document type from the doc object (C# is strong-typed) declaration as you will need this line, i.e.:
@edanastas download BimorphNodes v3 and use the new CAD.SetLayerVisibility node (your view template is a type of view, so input it into the view input)
Can you help confirm a few things about the functionality of this node?
-Can it be used to access DWGs from a linked model? I did not have any luck during my attempts.
-Can you elaborate more on the type of views it will take. Will it work with Area Plans?
-Do you know why i am getting the error below?
Original Issue:
The architect is using CAD links in their views for some parts of floorplans and we want to be able to hide a specific layer that they are using to cloud items for an addendum. I was not able to use this node from my model so my compromise it to make the changes in the linked Arch model directly.