Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X
Hi,
i have an IpfcModel object and i want to know, via vb api, its lenght unit (mm or inch).
Is possible to do it?
Thanks
Just figured this out using VBA. You need to use ipfcSolid.GetPrincipalUnits:
Option 1:
Dim model As IpfcModel
Set model = session.CurrentModel
Dim SolidMdl As IpfcSolid
Set SolidMdl = model 'Convert to IpfcSolid to get units
Dim UnitSys As IpfcUnitSystem
Set UnitSys = SolidMdl.GetPrincipalUnits
MsgBox UnitSys.Name
MsgBox UnitSys.GetUnit(EpfcUNIT_LENGTH).Name
Option 2:
Dim model As IpfcModel
Set model = session.CurrentModel
Dim SolidMdl As IpfcSolid
Set SolidMdl = model 'Convert to IpfcSolid to get units
MsgBox SolidMdl.GetPrincipalUnits.GetUnit(EpfcUNIT_LENGTH).Name
Options for GetUnit:
• EpfcUNIT_LENGTH—Specifies length measurement units.
• EpfcUNIT_MASS—Specifies mass measurement units.
• EpfcUNIT_FORCE—Specifies force measurement units.
• EpfcUNIT_TIME—Specifies time measurement units.
• EpfcUNIT_TEMPERATURE—Specifies temperature measurement units.
• EpfcUNIT_ANGLE—Specifies angle measurement units.