×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Contact US

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!

*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

CATIA V5 Macro for get parent
2

CATIA V5 Macro for get parent

CATIA V5 Macro for get parent

(OP)
Hi guys,

I would like have a macro which will get a parent from a product or a part selected.
I have a product (catproduct) with many many part (catpart) and the problem is : When i would like to copy a part from the product and past it in the same product i need to scroll up during 1000 years --".

So my questions are :
- did catia V5 have a shortcut for it ? if yes which one, cause i looking for it for long time but find nothing...
- If not, do you have a macro to get a parent from the selected part in the tree and center graph the parent ?

Thanks guys for your support !

RE: CATIA V5 Macro for get parent

Hi, you don't need a macro for this...right click on your part/product and choose "Open Sub-Tree". This command opens up a window with that part of the loooooong tree.

regards,
LWolf

RE: CATIA V5 Macro for get parent

(OP)
Hi LWolf,

Thanks for your reply but actually I don't want to see the sub tree i want to have the level upper...
To illustrate it :

Product1///
- Product2///
--Part1
--Part2
--Part3
--Part4
.
.
.
.
.
--Part11111
--Part11112

I want to copy/paste Part11111 and Part11112 into Product2 without scroll up during long time...
Please see picture :

RE: CATIA V5 Macro for get parent

yes, so right click on the product2 and open it with the aforemetionen function "Open-Sub Tree". Copy then the two parts, Ctrl-C, high-light product2 in the separate little window just opened and paste into it.
pls. try

regards,
LWolf

RE: CATIA V5 Macro for get parent

(OP)
WOW !!!!!
Ok no need macro then !!!
Thx a lot !

RE: CATIA V5 Macro for get parent

(OP)
Hey guys,

I need you again on this.
Now i have a lot (like a lot) of .catpart under a .catproduct and i really need to get the parent by maacro...
So what I need is : i left clic on a .catpart then macro that "center graph" the .catproduct

Pls help... ?

RE: CATIA V5 Macro for get parent

CODE --> vb

Sub CATMain()
  Dim sel: set sel = CATIA.ActiveDocument.Selection
  Dim prd: set prd = sel.Item(1).LeafProduct
  sel.Clear
  sel.Add prd.Parent.Parent
  CATIA.StartCommand "CATCafCenterGraphHdr"
End Sub 

RE: CATIA V5 Macro for get parent

(OP)
Thanks a lot Little Cthulhu !!! It's work very well !

RE: CATIA V5 Macro for get parent

(OP)
Guys,

To push a little bit more my request
Do you think it's possible to use button (UP, DOWN, RIGHT, LEFT) keyboard's to navigate in the tree ?

like from the selected element if I press :

Up button : I get the part above
Down button : I get the part below
Right button : I get the first children
Left button : I get the parent

Thx for your help :)

RE: CATIA V5 Macro for get parent

you can activate the tree structure by clicking on the small white axis at the bottom right of catia screen then select any part in the assembly and use up down left right to move in assembly...

Eric N.
indocti discant et ament meminisse periti

RE: CATIA V5 Macro for get parent

(OP)
Hey itmyjob, thx for your reply!

I kewn this tips before but actually, i never use it cause we need to activate the tree structure ! (yeah i'm boring, iknow...) But the main cause is the righ button go on design mode and as I said i have a looooot of different components... and if I go on design mode it took long (long long) time... the same issue to "get parent" (part above). The macro above is "fast" i'm looking for something "ergonomic"...

Thanks :)

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! Already a Member? Login


Resources

Low-Volume Rapid Injection Molding With 3D Printed Molds
Learn methods and guidelines for using stereolithography (SLA) 3D printed molds in the injection molding process to lower costs and lead time. Discover how this hybrid manufacturing process enables on-demand mold fabrication to quickly produce small batches of thermoplastic parts. Download Now
Design for Additive Manufacturing (DfAM)
Examine how the principles of DfAM upend many of the long-standing rules around manufacturability - allowing engineers and designers to place a part’s function at the center of their design considerations. Download Now
Taking Control of Engineering Documents
This ebook covers tips for creating and managing workflows, security best practices and protection of intellectual property, Cloud vs. on-premise software solutions, CAD file management, compliance, and more. Download Now

Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close