Creating custom commands in civil 3D

Creating custom commands in civil 3D

Anonymous
Not applicable
850 Views
1 Reply
Message 1 of 2

Creating custom commands in civil 3D

Anonymous
Not applicable

I know the CUI command is used to set up the commands and I know how to set up the name and description. I cant seem to make it work to where it shows when typing command i get an error of not a known command.

 

I am trying to do a command like E = endpoint, D = node, M = midpoint, vp = viewport etc.

 

and also trying to figure out certain code like getting dist and azimuths on a certain line.

 

also if this can be done for a certain profile that I can download on to a USB to use on other computers.

 

Thank you.

0 Likes
851 Views
1 Reply
Reply (1)
Message 2 of 2

cadffm
Consultant
Consultant

You can not create new command in your CUI,

thats only possible with programming.

If you are happy with 'what you do inside the CUI Dialog' (you creates Menu macros),

You can easily translate it to Lisp.

 

_-Layer;_make;MyLayer;;

 

In Lisp

(Command "_-Layer" "_make" "MyLayer" "")

 

If you need a command call for it:

(defun c:MyNewCommand nil

(Command .....the line frome above..)

)

 

Now you can use MYNEWCOMMAND

 

Read about how to save and load LSP files.

 

 

Another thing: ActionMacros are also available as commands!

CLICK

Sebastian

0 Likes