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?

1 Like

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

6 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

Hello, excuse me, someone managed to do it ?; can explain the steps to be able to do it

@Kulkul @mzjensen Excuse me tagging you but have any idea if this can be done and how

@Christhian looking at the screenshot it appears that the name of the script (“Home”) is simply appended at the end of the command string and doesn’t have parentheses or the file extension. I would take a closer look at @Brendan_Cassidy’s example above.

thanks for the reply @mzjensen
but it still doesn’t work, could you try it and try to see if it works please?

^C^C_AECCRUNDYNAMOSCRIPT "C: \ DYNAMO \ Home.dyn"

^C^C_AECCRUNDYNAMOSCRIPT "C: / DYNAMO / Home.dyn"

Blockquote

There appear to be spaces in the file path and the slashes are the wrong direction. I recommend you copy and paste the path directly from Windows Explorer.

1 Like

You are absolutely right, although it takes time to load, it works, thanks

is it possible to run dynamo from (command “AECCRUNDYNAMOSCRIPT” “abc.dyn”)?