Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iLogic fractions

2 REPLIES 2
Reply
Message 1 of 3
Jam_Jumpin
325 Views, 2 Replies

iLogic fractions

I have a dialogue box that asks the user for a size. It only accepts decimals, is there a way to get it to accept fractions?

 

FT=th
FT = InputBox("Enter face thickness", "Face thickness", "3/16")
th=FT

 

iLogic, Inventor 2014

2 REPLIES 2
Message 2 of 3
adam.nagy
in reply to: Jam_Jumpin

Hi,

 

I got this feedback:

>>>>>

You can use one of the parameter-related functions from the Inventor API to do it:

Dim FT As Double = 3/16
Dim FTstring As String = InputBox("Enter face thickness""Face thickness""3/16")
If (Not String.IsNullOrWhiteSpace(FTstring)) Then
FT = ThisApplication.UnitsOfMeasure.GetValueFromExpression(FTStringUnitsTypeEnum.kUnitlessUnits)
End If
MessageBox.Show("Face thickness = " & Round(FT,6)"Test")

<<<<<

 

Cheers,



Adam Nagy
Autodesk Platform Services
Message 3 of 3
Jam_Jumpin
in reply to: adam.nagy

Thanks a lot! I will try this.

I'm so glad iLogic is so easy to use!

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report