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

ProUnitsystemUnitGet

dschmitz
1-Newbie

ProUnitsystemUnitGet

Hello all,

I have a "strange" problem (one of many actually). But the one I'd like help with is this: I get blown out of Pro/E WF2 when the function ProUnitsystemUnitGet is called and I can't seem to get the return value. The code is below. When I comment out the ProUnitsystemUnitGet, the program works fine. Any thoughts? TIA. -Dave Schmitz, Ingenium Product Development

int ReadData(ProMdl *ModelHandle))
{
ProError tkerr;
ProUnitsystem UnitSystem;
ProUnititem wLengthUnit;

tkerr = ProMdlPrincipalunitsystemGet(ModelHandle, &UnitSystem);
tkerr = ProUnitsystemUnitGet(&UnitSystem, PRO_UNITTYPE_LENGTH, &wLengthUnit);
}

This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
1 REPLY 1

Thanks to Patrick, Michael and William for responding. My issue was with the ModelHandle passed to the routine. The routine header should not have been a pointer, reading:

int ReadData(ProMdl ModelHandle)
{
ProError tkerr;
ProUnitsystem UnitSystem;
ProUnititem wLengthUnit;

tkerr = ProMdlPrincipalunitsystemGet(ModelHandle, &UnitSystem);
tkerr = ProUnitsystemUnitGet(&UnitSystem, PRO_UNITTYPE_LENGTH, &wLengthUnit);
}
Announcements
Attention: Creo 7.0 Customers
Please consider upgrading
End of Life announcement here.

NEW Creo+ Topics:
PTC Control Center
Creo+ Portal
Real-time Collaboration