|
发表于 2022-7-6 11:03:14
|
显示全部楼层
I think you may be misunderstanding Lee's question. He's asking what entity are you getting the 270 code from, is it a line, a dimension, a style, or any number of other possible graphical or non-graphical entities inside the drawing. Depending on what entity type it is, 270 may have differing meanings - that's why it could mean material of an entity or Dimension Units of a dimension style.
When you state you're getting the drawing's measurement units, this is actually saved in a variable called InsUnits and you can get that using (getvar "InsUnits"). From the code and some discussions previously it seems that it's getting the code from a dimension style entity. You can obtain the same by setting the style current and then doing (getvar "DIMUNIT") - which is actually obsolete (use DIMLUNIT & DIMFRAC & DIMLFAC instead). Note a drawing may contain numerous styles which may each have their own "units" - so that even if a DWG is set to (say) Milli Meters, that particular dimension may still display the value in Inches. |
|