Make a script to easily be able to change what all of the base level are on a CAD Linked file

Hi, I am trying to link in a bunch of CAD files and I would like to be able to use Dynamo to tell them which level they need to live on. To do that I need to be able to have a list of all of my imported CAD files and there names. Then I need to be able to tell each one of them which level in needs to be on (Base Level Parameter). But I am a long way from that. Here is what I got, can anyone help me?

Hi @mix,

You aren’t too far off in changing the Level of the DWG Import Instance, all you need to do for that is SetParameterByname component and choose the Levels like i have shown below…

However, it seems you are trying to do more than that, you are saying you want to Link the DWG’s into your project (I’m assuming with Dynamo) and then update the Levels? I quickly knocked up a script that does exactly this, it is mostly in python I’m afraid as I couldn’t find a node that did what i wanted so needed to use the API. But you can create custom nodes from these easily and add to your personal library. I have shown a demo below of the script in action…

I have also attached the script here…
ImportDWG.dyn (29.5 KB)

Hope this helps with what you are trying to achieve.

p.s. you are on an old release of Dynamo, be sure to upgrade :wink:

Cheers,
Dan

2 Likes