×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

DisplayDimension.SetText question

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?




RE: DisplayDimension.SetText question

(OP)
Correction:

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.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources