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

activate sub assembly using toolkit

SOLVED
Highlighted

activate sub assembly using toolkit

Hello

 

I have active assembly in window and i would like to activate sub assembly through toolkit..

 

Is it possible to do same same in pro-toolkit or not? 

 

Thanks and Regards

Ketan

1 ACCEPTED SOLUTION

Accepted Solutions

Re: activate sub assembly using toolkit


@Ketan_Lalcheta wrote:

I have assembly having sub assemblies. Just wanted to provide ProAsmcompConstrRedefUI() API for component of sub assembly

 

Suggested API works fine for first level components of assembly. It asks for activation of sub assembly if we need to update component of sub assembly. In manual operation of Creo, Clicking on sub assembly component for redefine activates sub assembly automatically.


AFAIK ProAsmcompConstrRedefUI() works fine. You should check your code which is setting ProAsmcomp from ProAsmcomppath - there must be something wrong there.

11 REPLIES 11

Re: activate sub assembly using toolkit

I can't found a function for this.

But, I think, it is possible by running a mapkey.

~ Command `ProCmdMakeActive`

Re: activate sub assembly using toolkit

Yes, but map key load in between different API doesn't work properly...

Re: activate sub assembly using toolkit


@Ketan_Lalcheta wrote:

Yes, but map key load in between different API doesn't work properly...


Hello all,

Ketan, a component activation UI command essentially manipulates ProAsmcomppath and subsequently ProSelect or ProReference behind the scenes. Just make a new ProAsmcomppath from ProAsmcomppath of a given component to make a parent subassembly in question to be a new ProAsmcomppath owner and shorten up ProIdTable accordingly.

 

HIH.

FV.

Re: activate sub assembly using toolkit

Thank you for your response.

 

I got your point that we just need to play with Asmcomppath. If I create asmcomppath to first level sub assembly as if it is top level assembly, will it simply activate first level sub assembly. I mean I am not getting what to do next after creating first level sub assembly's asmcomppath so that it gets activated.

 

Thanks again.

 

Regards

Ketan

Re: activate sub assembly using toolkit

Ketan, What is your app trying to do? (there is not going to be any 'activation' from the end user standpoint)

 


@Ketan_Lalcheta wrote:

Thank you for your response.

 

I got your point that we just need to play with Asmcomppath. If I create asmcomppath to first level sub assembly as if it is top level assembly, will it simply activate first level sub assembly. I mean I am not getting what to do next after creating first level sub assembly's asmcomppath so that it gets activated.

 

Thanks again.

 

Regards

Ketan


 

Re: activate sub assembly using toolkit

I have assembly having sub assemblies. Just wanted to provide ProAsmcompConstrRedefUI() API for component of sub assembly

 

Suggested API works fine for first level components of assembly. It asks for activation of sub assembly if we need to update component of sub assembly. In manual operation of Creo, Clicking on sub assembly component for redefine activates sub assembly automatically.

Re: activate sub assembly using toolkit


@Ketan_Lalcheta wrote:

I have assembly having sub assemblies. Just wanted to provide ProAsmcompConstrRedefUI() API for component of sub assembly

 

Suggested API works fine for first level components of assembly. It asks for activation of sub assembly if we need to update component of sub assembly. In manual operation of Creo, Clicking on sub assembly component for redefine activates sub assembly automatically.


AFAIK ProAsmcompConstrRedefUI() works fine. You should check your code which is setting ProAsmcomp from ProAsmcomppath - there must be something wrong there.

Re: activate sub assembly using toolkit

Thank you for your response. Could you help me with below snippet plz?

 

pObjAsmComp->owner = objAsmCompMdlOwner;
pObjAsmComp->id = vecAsmComp[vecAsmComp.size()-1];//last ID
pObjAsmComp->type = PRO_FEATURE;

 

where, objAsmCompMdlOwner is mdl handle for sub assembly whose component is to be redefined.

            vecAsmComp is a vector having all feature ID (required to have asmcomppath) for a component of sub assembly

 

This is what I have set as asmcomp for sub assembly component.

 

thanks again for your support.

Re: activate sub assembly using toolkit


@Ketan_Lalcheta wrote:

Thank you for your response. Could you help me with below snippet plz?

 

pObjAsmComp->owner = objAsmCompMdlOwner;
pObjAsmComp->id = vecAsmComp[vecAsmComp.size()-1];//last ID
pObjAsmComp->type = PRO_FEATURE;

 

where, objAsmCompMdlOwner is mdl handle for sub assembly whose component is to be redefined.

            vecAsmComp is a vector having all feature ID (required to have asmcomppath) for a component of sub assembly

 

This is what I have set as asmcomp for sub assembly component.

 

thanks again for your support.


Ketan, please post the snippet where you have ProAsmcomppath of the component to be redefined as your input. It is impossible to tell from what you had posted if your objAsmCompMdlOwner is correct or if you had copied ProIdTable into std::vector correctly. 

FV.