DisplayDimension.SetText question
DisplayDimension.SetText question
(OP)
I am trying to change the "callout below" component of a dimension using SetText method of DisplayDimension. That section of code looks like this:
strBelow = DispDim.GetText(4)
If (strBelow <> "") Then
strBelow = strBelow & ", " & strTimes
Else
strBelow = strTimes
End If
junk = DispDim.SetText(4, strBelow)
When I run the macro the dimension get changed as expected. But when I do a regen the change dissapears and the dimension returns to the initial form.
Changes done using ModelDoc2.EditDimensionProperties2 "stick", they are not reversed at regen but to use that method I have to retrieve first the long list of dimension properties. I want to quickly change just one out of 17.
I am using SW03 SP5.
How do I make the change done with SetText stable?
strBelow = DispDim.GetText(4)
If (strBelow <> "") Then
strBelow = strBelow & ", " & strTimes
Else
strBelow = strTimes
End If
junk = DispDim.SetText(4, strBelow)
When I run the macro the dimension get changed as expected. But when I do a regen the change dissapears and the dimension returns to the initial form.
Changes done using ModelDoc2.EditDimensionProperties2 "stick", they are not reversed at regen but to use that method I have to retrieve first the long list of dimension properties. I want to quickly change just one out of 17.
I am using SW03 SP5.
How do I make the change done with SetText stable?






RE: DisplayDimension.SetText question
Only dimensions created with "HoleCallout" get reversed, and they are reversed with EditDimensionProperties too.
If I do that change "manually", clicking on the dimension then typing in the added text, the change sticks.
Anybody has any suggestion on adding number of holes in the dimension text as SW has no real ability to do that. I know there is a tentative in SW04 but it gives the number of holes created in one step. If I create 4 M8 thru holes, dimension them and later add another hole M8 thru SW04 doesn't change the count to 5.