×
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

macro - current selection

macro - current selection

macro - current selection

(OP)
Hi everyone,
I´ve got a question to get with macro current selection in Catia.
I know to get a Brep reference, but i don´t need it right now. I want "path" of selected feature in format like is in "status bar" looks like "Face.15/Translate.1/Geometrical Set"

Can you someone help me please?

Thanks a lot

RE: macro - current selection

Try this

CODE --> vb.net

plane1 = selection1.item(1).value
oParent = plane1

            Do
                sPath = "\" & oParent.Name & sPath
                oParent = oParent.Parent
                i = i + 1
            Loop Until TypeName(oParent) = "PartDocument" Or i = 100 

Tiago Figueiredo
Tooling Engineer

Youtube channel:
https://www.youtube.com/channel/UC1qdlBeJJEgMgpPLV...

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