Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski 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
Joined
Apr 28, 2004
Messages
56
Location
US
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?
 
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

Back
Top