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!

Is there a way of adding a part to an existin view?

Status
Not open for further replies.

l3ob

Aerospace
Apr 28, 2004
56
If I have a view that was created from a large assy by selecting one of the sub-assy's within the top product at creation (only parts from that sub-prod were projected in the view), can I add a part or parts from one of the other sub-products later?
 
Replies continue below

Recommended for you

Not interactively. We have a script written internally that does this, however.

One thing to watch out for though, if there is any positioning information on your sub-products, then the new parts may not show up in the correct location.
 
Would it be possible to get a copy of that script posted here? I have a little experience with writing script. That one would be helpful.
 
Sorry, it's not mine to give away (I didn't write it). I can tell you that the critical APIs are in the following snippets (taken from the Online Documents):

Dim viewLinks As DrawingViewGenerativeLinks
Set viewLinks = MyView.GenerativeLinks
viewLinks.AddLink(MyPartDocument)

Dim viewLinks As DrawingViewGenerativeLinks
Set viewLinks = MyView.GenerativeLinks
Dim MyLinks As DrawingViewGenerativeLinks
viewLinks.CopyLinksTo(MyLinks)

Dim viewLinks As DrawingViewGenerativeLinks
Set viewLinks = MyView.GenerativeLinks
viewLinks.NexRemoveAllLinks()

Don't feel intimidated by writing your own Scripts. It's easy - believe me, the only formal Programming training that I ever had was Fortran77 (back when it was new). Start with the Macro Recorder, and look at existing scripts. When you are stumped, post your code to one of the forums and you'll usually get an answer pretty fast. All 3 forums that I use are pretty good in the programming area (COE, German CATIA forum, and this one).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor