Skip to main content
1-Visitor
August 28, 2018
Solved

Asm Comp path to Asm comp | ProToolkit

  • August 28, 2018
  • 2 replies
  • 3927 views

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

 

Best answer by YaroslavSin

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

2 replies

14-Alexandrite
August 28, 2018

What about API "ProAsmcomppathMdlGet()" ?

1-Visitor
August 29, 2018
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..
16-Pearl
August 28, 2018

 

 

ProMdl Model;

ProAsmcomppath CompPath;

 

// Got Asmcomppath

 

Model = CompPath.owner;

 

I hope, this is your requirement.

1-Visitor
August 29, 2018
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
1-Visitor
August 30, 2018

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