is there any way of executing commands in civil 3d without opening the standard dialog boxes? and thus completing the command automatically with the standard settings?
Hi @mateusc94,
Some commands (not all) have a pure command line version without dialogs. You can execute this version by preceding the command name with a hyphen.
More info here.
I need to automate the _AeccAddPressureNetworkLabel command in Civil 3D, however, when I execute this command with Send.Command the following dialog box appears. The idea would be to complete the command automatically without this dialog box appearing. Is this possible?
No, the purpose of that command is to open the Add Labels dialog, so there is no command line equivalent.
You could look into the individual commands for adding labels, however. For example, ADDPRESSUREPLANLABELS
.
Is your goal to automate the creation of pressure network labels using Dynamo? If so, then I think you will have more success by making API calls in a Python node than by trying to string together command line prompts.
I’ll second this, and add that a zero touch node would be even more successful as you won’t have to worry about the security risk of IronPython 2 engine lr the often insufficient CPython engine.
Yes, I need to automate it. Would you recommend any API methods?
Depends on the type of label that you want to create, but to start with you could try the PressurePipeLabel
class. There is a Create()
method available that you can use.
I need to add a Pressure Pipe Plan Label to existing Pressure Pipes.
I’m trying to adapt this Create ( ) method to a python node, but I can’t find and access the INPUT ObjectId labelStyleId. Do you have any tips for this task?
C#
public static ObjectId Create(
ObjectId pipeId,
double ratio,
ObjectId labelStyleId
)