Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross 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
Jun 19, 2003
137
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
 
Replies continue below

Recommended for you

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