Community
Civil 3D Customization
Welcome to Autodesk’s AutoCAD Civil 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Civil 3D Customization topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Need diesel updates

1 REPLY 1
Reply
Message 1 of 2
bcsurvey
229 Views, 1 Reply

Need diesel updates

So I followed this link http://www.crlf.de/Dokumente/Diesel/Diesel5.html

 

but it seems that this was posted a long time ago and that code requirements have changed since it was posted.  Specifically I need the following two expressions updated for use in C3D 2014:

 

Half a line:

 

^C^C_id;\_setenv;P1;$M=$(getvar,lastpoint);+
_id;\_setenv;P2;"$M=$(getvar,lastpoint)";+
_line;"""$M=$(getenv,P1);$(getenv,P2);;+
_lengthen;_p;50;$(getenv,P2);"""

 

Auto-Number:

 

^c^ctext;_m;\;;$M=$(getvar,USERI1);setvar;USERI1;$(+,1,$(getvar,USERI1))

 

I can see what the intent is in each, and from researching "setenv", "getvar", ; = ENTER, \ = pending input, etc. for current software I think I'm very near understanding it, but for the sake of time, I'm deferring to those in the know.

 

Thank you

Civil 3D 2019 (6.1)
Windows 10 Pro (21H2)
(i7-11850H @ 2.50 GHz)
32GB RAM
NVIDIA RTX A2000
1 REPLY 1
Message 2 of 2
Balaji_Ram
in reply to: bcsurvey

Hi,

 

Sorry for the delay.

 

The way the first macros works is by invoking the Id command to accept point inputs and store them in env variables.

Based on the chosen points, a line is created and shortened by 50 percent using the lengthen command.

 

Some of the commands that are used in the diesel macros that you shared are specific to AutoCAD LT.

So, they might work ok in LT but not in regular AutoCAD.

 

The second diesel expression that you shared should work ok as it only uses setvar to keep track of the running count.

 

I think, using Lisp in macros should be a better option when working with regular AutoCAD.

 

Regards,

Balaji 



Balaji
Developer Technical Services
Autodesk Developer Network

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


 

Autodesk Design & Make Report