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.

Units report

barnlogic

New member
Hi,


I am trying to create a report of the units used in each part in an assembly. I was trying to use a visit function (ProSolidFeatVisit)to get to each component. But then I cannot find the right API function to get the units from the solid. I can use ProMdlPrincipalunitsystemGet and ProMdlCurrentGet to get to theunitsof the ProMdl but then my report only lists the units for the assembly. I tried using ProSolidToMdlto coventthe solid to a mdl, but then ProMdlCurrentGet crashes and whenI compile, and without it I cannot get the data I need for the report. Any suggestions?


The error I get is: error C2664: 'ProMdlCurrentGet' : cannot convert parameter 1 from 'ProAsmcomp ** ' to 'ProMdl * '



Thanks!
Edited by: barnlogic
 
Hi,
the assembly's components are features, you have to use ProAsmcompMdlGet to get the required ProMdl.

Regards,
TL
 
Hi,


Not sue if this is what you are looking for try using "pfcModelItem.Parameter.GetUnits"


Thanks,
Amit
Edited by: amit.dabade
 
Thanks _TL_, that worked. Now it functions as desired, but it crashes on some larger assemblies without any noticable pattern. Well, not yet, I am still investigating.


Thanks again!
 

Sponsor

Articles From 3DCAD World

Back
Top