Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

DisplayDimension.SetText question

Status
Not open for further replies.

dogarila

Mechanical
Oct 28, 2001
594
I am trying to change the "callout below" component of a dimension using SetText method of DisplayDimension. That section of code looks like this:

Code:
strBelow = DispDim.GetText(4)
 If (strBelow <> &quot;&quot;) Then
    strBelow = strBelow & &quot;, &quot; & 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 &quot;stick&quot;, 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?




 
Replies continue below

Recommended for you

Correction:

Only dimensions created with &quot;HoleCallout&quot; get reversed, and they are reversed with EditDimensionProperties too.

If I do that change &quot;manually&quot;, 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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor