ILoveMadoka 发表于 2022-7-6 17:07:19

Dim Styles - 2 questions..

1) Can the creation of new dim styles be automated?   Script? Lisp?
 
2) Can Dim Styles be locked such that they cannot be modified,
    bypassed or ignored?  
Ok.. so that's 4 questions...
 
Please advise!!
 
Thanks so much for all previous help!!

Lee Mac 发表于 2022-7-6 18:40:35

1) I personally have never tried to create a dimstyle via LISP methods, but I suppose the way I would go about it is to set all the dim variables to how I would like the dim-style to be:, i.e.
 

DIMADEC   0                  Angular decimal placesDIMALT      Off                  Alternate units selectedDIMALTD   4                  Alternate unit decimal placesDIMALTF   0.0394               Alternate unit scale factorDIMALTRND   0.0000               Alternate units rounding valueDIMALTTD    4                  Alternate tolerance decimal placesDIMALTTZ    0                  Alternate tolerance zero suppressionDIMALTU   8                  Alternate unitsDIMALTZ   0                  Alternate unit zero suppressionDIMAPOST                         Prefix and suffix for alternate textDIMASZ      3.0000               Arrow sizeDIMATFIT    3                  Arrow and text fitDIMAUNIT    0                  Angular unit formatDIMAZIN   0                  Angular zero supressionDIMBLK      ClosedFilled         Arrow block nameDIMBLK1   ClosedFilled         First arrow block nameDIMBLK2   ClosedFilled         Second arrow block nameDIMCEN      0.0000               Center mark sizeDIMCLRD   5 (blue)             Dimension line and leader colorDIMCLRE   5 (blue)             Extension line colorDIMCLRT   2 (yellow)         Dimension text colorDIMDEC      2                  Decimal placesDIMDLE      0.0000               Dimension line extensionDIMDLI      2.0000               Dimension line spacingDIMDSEP   .                  Decimal separatorDIMEXE      2.0000               Extension above dimension lineDIMEXO      2.0000               Extension line origin offsetDIMFRAC   0                  Fraction formatDIMGAP      2.0000               Gap from dimension line to textDIMJUST   0                  Justification of text on dimension lineDIMLDRBLK   ClosedFilled         Leader block nameDIMLFAC   1.0000               Linear unit scale factorDIMLIM      Off                  Generate dimension limitsDIMLUNIT    2                  Linear unit formatDIMLWD      -2                   Dimension line and leader lineweightDIMLWE      -2                   Extension line lineweightDIMPOST                        Prefix and suffix for dimension textDIMRND      0.0000               Rounding valueDIMSAH      Off                  Separate arrow blocksDIMSCALE    0.0000               Overall scale factorDIMSD1      Off                  Suppress the first dimension lineDIMSD2      Off                  Suppress the second dimension lineDIMSE1      Off                  Suppress the first extension lineDIMSE2      Off                  Suppress the second extension lineDIMSOXD   Off                  Suppress outside dimension linesDIMTAD      3                  Place text above the dimension lineDIMTDEC   2                  Tolerance decimal placesDIMTFAC   1.0000               Tolerance text height scaling factorDIMTIH      Off                  Text inside extensions is horizontalDIMTIX      Off                  Place text inside extensionsDIMTM       0.0000               Minus toleranceDIMTMOVE    2                  Text movementDIMTOFL   Off                  Force line inside extension linesDIMTOH      Off                  Text outside horizontalDIMTOL      Off                  Tolerance dimensioningDIMTOLJ   1                  Tolerance vertical justificationDIMTP       0.0000               Plus toleranceDIMTSZ      0.0000               Tick sizeDIMTVP      0.0000               Text vertical positionDIMTXSTY    STANDARD             Text styleDIMTXT      2.5000               Text heightDIMTZIN   0                  Tolerance zero suppressionDIMUPT      Off                  User positioned textDIMZIN      8                  Zero suppression
 
And then include in my code:
 

(vl-cmdf "-dimstyle" "Save" "My_Dimstyle")
 
But as I say, I have never tried myself, and so I would not know if this would work or not...
 
2) I personally do not think it is possible to lock a dimstyle, but others may prove me wrong.
页: [1]
查看完整版本: Dim Styles - 2 questions..