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!

CATIA Search 1

Status
Not open for further replies.

catdeveloper_begin

Automotive
Sep 20, 2016
12
Is there a way to search for published elements in a CATIA part when working in a macro?

I need to select a particular published element in one file and copy it to the other file through code. Currently I am looking for the element by name. But, the element is published. And I have to copy only the published element of that name and any other element with the same characters in the name which is not published has to be ignored.

How can I get this done?

Thanks in advance
 
Replies continue below

Recommended for you

Hello,

Try this:
Code:
 Dim publications1 = part1.Publications
            Num_publications = publications1.Count
            For b = 1 To Num_publications

                Dim publication1 = publications1.Item(b)

                Dim pubRef As Reference

                pubRef = publication1.Valuation

                Dim PubName As String = publication1.Name
Next
pubRef is the one you need to select.


Tiago Figueiredo
Tooling Engineer

Youtube channel:
 
Thanks for the help TiagoFigueiredo.... I will try this one out and let you know....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor