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

Dimension macro

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
Anonymous
1770 Views, 5 Replies

Dimension macro

Hello,

 

Im trying to make a costum macro of a linear dimension.

So when i click my costum macro in my toolbaar i'd like to set a linear dimension with a costum dimstyle and costum layer.

 

I tried several thinks but nothing seems to work so far.

This is what i got for example..

 

^C^C-layer;_s;"CostumLayer1";;-dimstyle;r;;"CostumDimStyle1";;_dimlinear; 

 

Anyone that can help me solve this?

 

Thank you

5 REPLIES 5
Message 2 of 6
pendean
in reply to: Anonymous

What version of LT are you using? LT2016 has a variable called DIMLAYER that will do what you want for dimensioning on a specific layer. No macro needed.
Message 3 of 6
Anonymous
in reply to: pendean

Hello,

 

Using autocad 2016LT.

 

Knipsel.PNG this are 3 buttons for example.

 

The black dimension is standard, standard layer and standard dimensionstyle in millimetres for example.

 

The Red one is for electric, and should be under the layer Electric and should have a different dimension style in centimetres

 

The blue one is for water, and should be under the layer Water and should have a different dimension style in centimetres

 

And because i wouldn't need to change my layer and dimensionstyle all the time id like to use macro's...

 

Thanks in advance

 

 

Message 4 of 6
sthompson1021
in reply to: Anonymous

This works for me in 2016 full autocad

^C^C-LA;S;YOURLAYER;^C-DIMSTYLE;R;YOURDIMSTYLE;DIMLINEAR;

Message 5 of 6
pendean
in reply to: Anonymous

Great: you can still use DIMLAYER variable in your various scripts to set the dimension layers before you start DIMLINEAR.

Get in the habit of using the MAKE option for layer: not only does it set that layer it also creates it if for some reason it's missing. So the first part of your macro looks like this instead

^C^C-layer;_m;"CostumLayer1";;dimstyle;"whateverlayername";-dimstyle;r;;"CostumDimStyle1";;_dimlinear;
Message 6 of 6
Anonymous
in reply to: sthompson1021

 

^C^C-LA;S;YOURLAYER;^C-DIMSTYLE;R;YOURDIMSTYLE;DIMLINEAR;

 

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

Post to forums  

Forma Design Contest


Technology Administrators