Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

API round to fraction

Status
Not open for further replies.

zuccus

Petroleum
Joined
Jun 19, 2003
Messages
137
Location
US
How do I activate the round to fraction flag in VB.

So far I got the following bit that works well.

Part.SetUserPreferenceIntegerValue swUnitsLinear, swFEETINCHES
Part.SetUserPreferenceIntegerValue swUnitsLinearDecimalDisplay, swFRACTION
Part.SetUserPreferenceIntegerValue swUnitsLinearFractionDenominator, 16

Thanks
SW 2006
 
Finnally found what I was doing wrong.
In case anybody is interested you have to use the toggle switch as shown pasted below.

Part.SetUserPreferenceToggle swUnitsLinearRoundToNearestFraction, 1

Hopefully this will help somebody one day.
 
Check the API help on ModelDoc2::GetUnits and ModelDoc2::SetUnits.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top