Continue to Site

Welcome to MCAD Central

Join our MCAD Central community forums, the largest resource for MCAD (Mechanical Computer-Aided Design) professionals, including files, forums, jobs, articles, calendar, and more.

ProAsmcomp

_rpm_

New member
I have a ProAsmcompPath that is valid. I now
want to add a constraint to the object that
is referred to by that path. The function
ProAsmcompConstraintsSet() requires a
ProAsmcomp object and I haven't found a way
to get a ProAsmcomp from a ProAsmcompPath.


Does anyone know a method to get from the path to the Asmcomp?

Thanks,
rpm
 
Can you just fill the AsmComp path structure with the required elements? A ProAsmcomp is just a structure containing id, type, and owner. So if you have the ProAsmcompPath you should be able to fill the strucuture like this (assuming you already have the asmComppath like you said you did):


ProAsmcomp asmComp;


ProAsmcomppath asmComppath;


asmComp.owner = asmComppath.owner;


asmComp.id = asmComppath.comp_id_table[0];


asmComp.type = PRO_FEATURE;


I made the type PRO_FEATURE because an assembly component is a feature in the context of an assembly. I used the comp_id_table[0] because I'm assuming it's at the top level of the assembly. You'll have to give it a try for your specifics but it should be a good starting point.
 
Thanks for the reply.
I tried what you suggested and got a valid structure. In my experimentation I also tried the function ProFeatureInit() which gave me a structure with the same contents.

Now when I call the function ProAsmcompConstraintsSet() with this structure and the constraints array Pro/E dies and the result is a PRO_TK_COMM_ERROR.

I have to investigate the constraints.

Thanks again.
 

Sponsor

Articles From 3DCAD World

Back
Top