cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

How to find component ID

ptc-3191571
1-Visitor

How to find component ID

Hello,
I am having assembly file with two component lets say x & y.Now I am loading the assemblyusing ProMdlLoad()then I want to process its components,but I can't use ProSelect. So I tried using ProModelitemByNameInit() which will give me ID in the form of ProModelitem.id,but it gives me "PRO_TK_E_NOT_FOUND".
I have used somthing like this -
result = ProMdlInit(x.prt,PRO_MDL_PART,&model);
result = ProModelitemByNameIni(model,PRO_PART,x.prt,&pMdlItem); //Here I get NOt found message
So now plese help me to get Component ID or issue with this method.

Thanks


This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
1 REPLY 1
FV
17-Peridot
17-Peridot
(To:ptc-3191571)

Hi all,

Rahul, please take a look at "Listing the Members of an Assembly" example in the "Visiting assembly components" chapter of Pro/Toolkit User Guide.

HIH

Feliks.


In Reply to Rahul M.:

Hello,
I am having assembly file with two component lets say x & y.Now I am loading the assemblyusing ProMdlLoad()then I want to process its components,but I can't use ProSelect. So I tried using ProModelitemByNameInit() which will give me ID in the form of ProModelitem.id,but it gives me "PRO_TK_E_NOT_FOUND".
I have used somthing like this -
result = ProMdlInit(x.prt,PRO_MDL_PART,&model);
result = ProModelitemByNameIni(model,PRO_PART,x.prt,&pMdlItem); //Here I get NOt found message
So now plese help me to get Component ID or issue with this method.

Thanks

Announcements
NEW Creo+ Topics: Real-time Collaboration


Top Tags