Jump to content

Recommended Posts

Posted

Is there a way to access any data from Drawing Units? I suppose I can use the vla syntax, but I don't know which one...
Thank you for the help!

Posted

AutoLisp can access the system variables. With GETVAR you can read the values stored in INSUNITS or MEASUREINIT. Some variables also can be changed using the SETVAR command. Just find the sysvar that is relevant for your task.

  • Like 1
Posted
9 hours ago, fuccaro said:

AutoLisp can access the system variables. With GETVAR you can read the values stored in INSUNITS or MEASUREINIT. Some variables also can be changed using the SETVAR command. Just find the sysvar that is relevant for your task.

Thank you! Do you know where I can access a list or a website containing all of them?

Posted (edited)

Setvar ? * is your answer as 1st step. Press Enter Enter ........

 

Setvar ? T*

Edited by BIGAL
  • Like 1
Posted

Sysvdlg shows you all the variables and explain what's it's use

  • Like 1
Posted

Thank you all for the answers, the next question is, all the value is stored in integer. How do I know if it's cm or mm or something? Do I have to list them all myself?

Posted (edited)

@Aditya Bagaskara

Study these System Variables. You can look them up in AutoCAD's help bar:

   LUNITS = Integer representing the liner units type; i.e. Scientific, Decimal, Fractional, etc..

   LUPREC = Integer representing the unit precision; i.e. how many places behind the decimal point.

   MEASUREMENT = 0 is Imperial (inches), and 1 is Metric (mm, cm, m)

  MEASUREINIT = integer representing whether imperial (0) or metric (1) Hatch patterns and Linetypes are used.

 

There are more, but those the the main ones.

 

Technically - AutoCAD is "scaleless", meaning you define the scale of 1 unit, whether that is 1 mm or 1 meter. The system variables above control how that scaling is displayed and calculated. In Imperial measurement however, Fractional and Architectural scale are dependant on inches being the 1 unit, because of the way they are displayed.

 

Edited by pkenewell
  • Like 1
Posted
18 minutes ago, pkenewell said:

@Aditya Bagaskara

Study these System Variables. You can look them up in AutoCAD's help bar:

   LUNITS = Integer representing the liner units type; i.e. Scientific, Decimal, Fractional, etc..

   LUPREC = Integer representing the unit precision; i.e. how many places behind the decimal point.

   MEASUREMENT = 0 is Imperial (inches), and 1 is Metric (mm, cm, m)

  MEASUREINIT = integer representing whether imperial (0) or metric (1) Hatch patterns and Linetypes are used.

 

There are more, but those the the main ones.

 

Technically - AutoCAD is "scaleless", meaning you define the scale of 1 unit, whether that is 1 mm or 1 meter. The system variables above control how that scaling is displayed and calculated. In Imperial measurement however, Fractional and Architectural scale are dependant on inches being the 1 unit, because of the way they are displayed.

 

Thanks for the details! :)

  • Like 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...