×
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

Relink dimensions

Relink dimensions

Relink dimensions

(OP)
Howdy, I have a VBA script to auto-gen CATdrawings using a generic "seed" drawing of several variations of a catalog part.

The drawing views update fine using mylinks.RemoveAllLinks and mylinks.AddLink (oPartProd.ReferenceProduct).

However the dimensions will not update to the new part (even though they stay black, not pink). The drawing thinks it's updated, a force update doesnt work.

What weird thing is if take this drawing and relink the views manually via edit/links... the dimensions magically update.

Anyone have any ideas how to force the dimensions to update via the script..??

cheers
 

RE: Relink dimensions

When you are Removing the links, the Dimensions become Isolated.  If you turn on Dimensions Diagnostics (tools, options, mech design, drafting, dimensions), you will see that the dimensions turn blue.  
When you replace the links interactively, you are not Removing and Adding links, you are actually replacing those links.  Subtle difference, but it maintains the associativity of the dimensions.   

RE: Relink dimensions

(OP)
Thanks Jim, that makes sense. So you do know of a way to maintain the associativity of the links via VBA as opposed to the removing/adding links method..?

Thanks

RE: Relink dimensions

(OP)
Seems "SaveAs" is your friend. It's a messy alternative but it works.

RE: Relink dimensions

You can also look into Templates.   I think you need the PKT/KT1 license, though.

I'm not sure if there is an api that lets you relink a drawing without breaking the links.  

It can be problematic when doing this intereactively as well.  The dimensions and the view care about the UUID of the parts they are tied to.  If you try to relink a veiw to a part with a different UUID, you will get the "Link refused the Document" error, but if you have two parts with the same UUID (which you will get with Save As), you can have problems when using them in the same assembly.   

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