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
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 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
Thanks
RE: Relink dimensions
RE: Relink dimensions
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.