How to make a button in Civil 3D for the Dynamo for Civil 3D script?

How to make a button in Civil 3D for the Dynamo for Civil 3D script?

Hi, Artem, i tried and got this.
It works, nice idea.

4 Likes

Can you describe in detail how you did it?

Alexander, can you please describe in more detail how you did this?
For some reason I didn’t succeed.


Original post below the line


Александр, можете пожалуйста , подробнее описать, как вы это сделали?
У меня почему то не получилось.

Is there a way to point to a dyn file in a particular directory?

I figured it out. The path is stored in the profile. So, I just added this to our .arg file.
[HKEY_CURRENT_USER\Software\Autodesk\AutoCAD\R23.1\ACAD-3000:409\Profiles\{YOURPROFILE}\Dialogs\Select_script_file]
"InitialDirectory"="{YOURDIRECTORY}"

Unfortunately, this is only an initial directory setting, so if a user browses to a different directory using the AECCRUNDYNAMOSCRIPT command, the button will no longer work after that.

2 Likes

You can also put an entire path to the .dyn file in the CUI. If there are spaces, enclose it in double quotes. Use the / path separator too.

1 Like

You can make the button run any script from anywhere if you do the following:

  • Make sure the slash between folders is a “/”
  • I would add the path within quotes

Example code for macro of button:
^C^C_AECCRUNDYNAMOSCRIPT “C:/Revit to Civils/Civils to JSON.dyn”

3 Likes