Dr. Sun

Dr. Sun

Anonymous
Not applicable
899 Views
5 Replies
Message 1 of 6

Dr. Sun

Anonymous
Not applicable

How do I the syntax of AutoCAD command, such as Tolerance, Line, etc.? Is there a reference manual to show the syntax? Thx. 

0 Likes
Accepted solutions (2)
900 Views
5 Replies
Replies (5)
Message 2 of 6

cadffm
Consultant
Consultant
Accepted solution
You talk about to controle autocad commands by menumacro,script or (send-)commands?
And the question is: What options, in which order they working?

No. Not for all and not with all details.
The possible and best way is to check the command workflow in commandline by hand.

Note: Some few commands are working by automation different to the normal version, started by hand.

Any concrete examples, questions?

Sebastian

0 Likes
Message 3 of 6

Anonymous
Not applicable

Thank you for your response. My current question is that I don't know what arguments I should put in the command Tolerance. I want to generate a feature control frame with flatness in it. So, (command "TOL" ... then what should I put? 

0 Likes
Message 4 of 6

cadffm
Consultant
Consultant
TOL, an Alias for Tolerance command?
This command is a dialog window command, or not?
And there are no "commandline version" available for this command, if i am right.
(I am away from acad in this minutes)

You can not controle dialogs or palettes with by commandline(and that is what you do with lispfunction (command), you only send informations to the commandline..

But if i am right, you will find all properties of tolerance as system variables.
You have to learn which variables set each propertie of tolerance.

Thats the same with all properties of dimstyles, each propertie of dimstyles are variables.

If am back in my homeoffice i take a look and answer again if nobody else answer faster.

General: You don't have to start with (command...) before you know what input is needed.
An easier example is command UCS.
Start in commandline: UCS<enter>
World<enter>
This set the world cs current =wcs.
For your lisp command function it is translate to:
(Command "ucs" "world")

In ten minutes i answer again..

Sebastian

0 Likes
Message 5 of 6

cadffm
Consultant
Consultant
Accepted solution

I have looked at it and if you mean TOL = TOLERANCE, then there is only the dialog version of the command,

so you can forget the AutoCAD command for your goal. And the data isn't stored in systemvariables/styles,

you would have to write your own function to create a Tolerance object (if you have fill Acad).

 

Create your wanted Tolerance object by hand and check the objectdata:

Command: (alert(cdr(assoc 1 (entget(Car(entsel))'("*"))))) 

This code is what you need!

 

Example Code for creating a tolerance object:

https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/creating-tolerance-blocks-with-scrip...

Sebastian

Message 6 of 6

Anonymous
Not applicable

Thanks and I'll try it. 

0 Likes