Linked AutoCAD file - changing parameters

Is there a way to change the Type name and other parameters of linked AutoCAD files via Dynamo? I’m perusing the nodes in the Bimorph package and they start the process well, particularly the CAD.ReportInstances node. However, I do not see a node to set parameters. Is this possible? I am an amateur with Python and Design Script and I do not know any other coding languages, so if possible I would like to not use these. Or, if a coding language is the only way, I’d appreciate a broken-down explanation so I can understand the code.

Reason: I have several new AutoCAD files from a consultant I have linked into Revit and I want to rename the now-obsolete CAD files with the same suffix to distinguish them from the up-to-date links.

If you’re talking about Revit parameters for linked CAD instances, yes. It works just like any other Revit element. Moving between the link types and link instances is slightly different, but follows the same principles as families/types/instances.

I thought so, an element is an element as far as I understand. So why is this SetParameter node saying the parameter is read-only?

What is this parameter’s name (circled in red below) according to Dynamo? “Type” only produces blank lists, which I take to mean the parameter name is invalid.

So as you’ve noticed, the instance Name is inherited from the Type - Type Name specifically. So you’ll have to get the CADLinkType from the instance and modify the Type Name. However, that parameter is still read-only by normal methods. You will have to use python to change the name via the API.
https://www.revitapidocs.com/2020/1198805b-fdbf-54bf-64d3-90dbd01b4c5f.htm

I suppose I can attempt to use this method, though this is quite a foreign language to me. I see how the link shows to access the Name, but I don’t know how to use it in a Python script for my situation. Looks like I have another learning curve to hike up.

Give it a shot. Once you get comfortable with it python can exponentially increase your chances at success. In this case, setting the name is about as easy as it gets in the Revit API. Try to find a basic API script on the forums here and see if you can get the syntax right.

Here I go. First question: which language do I use in my python script: C#, VB or C++? Second, how much of the script from your link do I paste into my python script? Third, where do I paste it into?

image

I recommend going through the Python portion of the Primer. It should answer a lot of your questions. There should also be plenty of posts here covering similar questions.

1 Like