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!

CATIA Search 1

Status
Not open for further replies.

catdeveloper_begin

Automotive
Joined
Sep 20, 2016
Messages
12
Location
IN
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
 
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

Back
Top