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

Community Tip - You can change your system assigned username to something more personal in your community settings. X

Asm Comp path to Asm comp | ProToolkit

Ketan_Lalcheta
19-Tanzanite

Asm Comp path to Asm comp | ProToolkit

Hello

 

I have asmcomppath of component in assembly. What I need to do is to allow user to redefine it's constraint. For that, We are going to use API ProAsmcompConstrRedefUI(), which ask for asmcomp.

 

Query is that how can we fond out ProAsmcomp if we are having proasmcomppath.

 

Feel free to ask for any query.

 

Note : we have used ProIdTable to get asmcomppath. ProIdTable (id for components) detail was dumped into model parameter.

 

Thanks and Regards

Ketan

 

1 ACCEPTED SOLUTION

Accepted Solutions

From example TestAsm.c

status = ProSelectionAsmcomppathGet(p_sel[0], &asmcomppath);
p_asmcomp->owner = asmcomppath.owner;
p_asmcomp->id =  asmcomppath.comp_id_table[0];
p_asmcomp->type = PRO_FEATURE;

 

But I think that for p_asmcomp->id need to use last ID in comp_id_table

View solution in original post

7 REPLIES 7

What about API "ProAsmcomppathMdlGet()" ?

I tried this earlier but it doesn't work as api results MDL handle and for api , we need asmcomp.. As asmcomp has modelitem structure, I checked with mdltomodelitem also, but no success..

 

 

ProMdl Model;

ProAsmcomppath CompPath;

 

// Got Asmcomppath

 

Model = CompPath.owner;

 

I hope, this is your requirement.

Parthiban Kannan

href="https://www.linkedin.com/in/parthiban-kannan/" target="_blank"

I am ooto and could not check this out today, but I think it may not work... We need asmcomp (similar to modelitem structure), not promdl...

Again another point is that owner of asmcomppath might be top assembly rather than considered item...

I am still not sure and would share results once I will test it tomorrow.. till then if any other method is most welcome..

Thanks and Regards
Ketan

Checked now and it failed... Any other option would be of great help.

From example TestAsm.c

status = ProSelectionAsmcomppathGet(p_sel[0], &asmcomppath);
p_asmcomp->owner = asmcomppath.owner;
p_asmcomp->id =  asmcomppath.comp_id_table[0];
p_asmcomp->type = PRO_FEATURE;

 

But I think that for p_asmcomp->id need to use last ID in comp_id_table

Great....It worked... Appreciate your response

Top Tags