Starting in December, we will archive content from the community that is 10 years and older. This FAQ provides more information.
I use this list :
((1000 . "DSTYLE") (1002 . "{") (1070 . 144) (1040 . -2.0) (1070 . 40) (1040 . 1.0) (1002 . "}"))
some times the first 1040 is the actual scale, but some times its the second
((1000 . "DSTYLE") (1002 . "{") (1070 . 144) (1040 . 5.0) (1070 . 40) (1040 . 1.0) (1070 . 43) (1040 . 5.0) (1002 . "}"))
some times it is in there 3 times ?
but the CRTL-1 window has the right 1
How do i know where the scale is ?
Solved! Go to Solution.
Solved by ambrosl. Go to Solution.
I believe it's the 1040 entry that immediately follows (1070 . 144).
I believe Kent is correct, but you might be able to eliminate the guess work though if you use the following AutoLISP functions which allow you to move away from needing to dig through the DXF code groups:
The above functions take Dimension Overrides into consideration and will return that value rather than the base dimension style when they are applied.
DUMPALLPROPERTIES returns a list of the properties that apply to a specific entity.
Begin dumping object (class: AcDbRotatedDimension) ... Dimgap (type: double) (LocalName: Text offset) = 0.090000 Dimjust (type: DimHorizontalTextPosEnum) (LocalName: Text pos hor) = 0 Dimldrblk (type: AcDbObjectId) = 0 Dimlfac (type: double) (LocalName: Dim scale linear) = 1.000000 Dimlim (type: bool) = 0 Dimltex1 (type: AcDbObjectId) (LocalName: Ext line 1 linetype) = 2a235140 Dimltex2 (type: AcDbObjectId) (LocalName: Ext line 2 linetype) = 2a235140 Dimltype (type: AcDbObjectId) (LocalName: Dim line linetype) = 2a235140 ... End object dump
When you have the property name and the entity, you can then get or set the property value.
(setq ent (car (entsel))) (getpropertyvalue ent "Dimlfac")
Using the GETPROPERTYVALUE and SETPROPERTYVALUE functions are much easier than sifting through DXF code values, habits are hard to break even I gravitate to DXF codes yet, and using those functions does require less code in the end. The functions were introduced back in AutoCAD 2011, so they have been around for a while unless you need to support AutoCAD 2010 or earlier then you would need to continue using the DXF code values directly.
Best of luck finishing your code.
Can't find what you're looking for? Ask the community or share your knowledge.