Author Topic: Updating dimensions with vla modification to dimstyle  (Read 2187 times)

0 Members and 1 Guest are viewing this topic.

dan19936

  • Guest
Updating dimensions with vla modification to dimstyle
« on: January 26, 2007, 05:37:59 PM »
I've worked out my dimension style setup routine using VLA instead of setvar/command and so far so good in defining the styles. Unfortunately if a dimension already exists in the drawing, it isn't visibly updated to match the new style variables unless the dimension is edited or modified/stretched. The style is updated and when you update dimension styles via DDIM they all update to the new settings.

Example code:
Code: [Select]
(setq *doc*  (vla-get-activedocument (vlax-get-acad-object))
      *dims* (vla-get-dimstyles *doc*)
)
(vla-setvariable *doc* "DIMDEC" 2)
(vla-copyfrom (vla-add *dims* "standard") *doc*)


Is there a way to 'touch' each dimension to update to the new style settings?

Thanks,

Dan

FengK

  • Guest
Re: Updating dimensions with vla modification to dimstyle
« Reply #1 on: January 26, 2007, 05:59:47 PM »
I'm guessing when you UPDATE a dimension with new style, all properties such as ArrowheadSize, DimensionLineColor, etc. will all change to match the new style which probably isn't what you want.  So you may need to just loop through each dimension object and set the PrimaryUnitsPrecision property.

dan19936

  • Guest
Re: Updating dimensions with vla modification to dimstyle
« Reply #2 on: January 26, 2007, 06:17:04 PM »
I'm guessing when you UPDATE a dimension with new style, all properties such as ArrowheadSize, DimensionLineColor, etc. will all change to match the new style which probably isn't what you want.  So you may need to just loop through each dimension object and set the PrimaryUnitsPrecision property.

I don't actually want to update the dimensions. If I did I'd lose any intentional overrides. What I'm trying to have the dimensions reflect the current changes to the dimstyle (where there are no overrides). Just the same as if I manually changed a dimension style via command line:
Code: [Select]
Command: dimdec

Enter new value for DIMDEC <2>: 8

Command: -dimstyle

Current dimension style:  Standard
Current dimension overrides:
 DIMDEC      8
Enter a dimension style option
[Save/Restore/STatus/Variables/Apply/?] <Restore>: sa

Enter name for new dimension style or [?]: standard

That name is already in use, redefine it? <N>:y

I want to 'touch' the dimension without 'updating' it.

dan19936

  • Guest
Re: Updating dimensions with vla modification to dimstyle
« Reply #3 on: January 26, 2007, 10:34:36 PM »