iLogic that will ask which parameters...

iLogic that will ask which parameters...

jwitt1983
Enthusiast Enthusiast
392 Views
2 Replies
Message 1 of 3

iLogic that will ask which parameters...

jwitt1983
Enthusiast
Enthusiast

Different parts require different parameters and sometimes it is not "d0,d1,d2" that defines length,width,depth... etc, see below.

How can I make this rule ask me for the 3 parameter names to perform export/custompropertyformat/precision/etc on?

Ideally this would just be in the form of 3 input boxes that I would then enter d0, d239, d1028... (whichever parameters currently represent LxWxD)

***Bonus: Have an extra input box where I can specify a different material within the Part Number, changing it from UHMW. (see bottom)

2019-03-12_1603.png

0 Likes
Accepted solutions (1)
393 Views
2 Replies
Replies (2)
Message 2 of 3

Sergio.D.Suárez
Mentor
Mentor
Accepted solution

Hi, Try using an imput box, something like this

 

oLength1 = InputBox("Select Length Parameter", "Ilogic Rule", "L1")

oWidth1 = InputBox("Select Length Parameter", "Ilogic Rule", "A1")

oThickness1 = InputBox("Select Length Parameter", "Ilogic Rule", "e1")

oLength = Parameter.Param(oLength1)
oLength.ExposedAsProperty = True
oFormatLength=oLength.CustomPropertyFormat
oFormatLength.PropertyType=Inventor.CustomPropertyTypeEnum.kTextPropertyType
oFormatLength.Precision=Inventor.CustomPropertyPrecisionEnum.kZeroDecimalPlacePrecision
oFormatLength.ShowUnitsString=False
oFormatLength.ShowTrailingZeros = False
oFormatLength.ShowLeadingZeros = False

oWidth = Parameter.Param(oWidth1)
oWidth.ExposedAsProperty = True
oFormatWidth=oWidth.CustomPropertyFormat
oFormatWidth.PropertyType=Inventor.CustomPropertyTypeEnum.kTextPropertyType
oFormatWidth.Precision=Inventor.CustomPropertyPrecisionEnum.kZeroDecimalPlacePrecision
oFormatWidth.ShowUnitsString=False
oFormatWidth.ShowTrailingZeros = False
oFormatWidth.ShowLeadingZeros = False

oThickness= Parameter.Param(oThickness1)
oThickness.ExposedAsProperty = True
oFormatThickness=oThickness.CustomPropertyFormat
oFormatThickness.PropertyType=Inventor.CustomPropertyTypeEnum.kTextPropertyType
oFormatThickness.Precision=Inventor.CustomPropertyPrecisionEnum.kZeroDecimalPlacePrecision
oFormatThickness.ShowUnitsString=False
oFormatThickness.ShowTrailingZeros = False
oFormatThickness.ShowLeadingZeros = False

Dim ovalue As String = "=UHMW, <" & oThickness1 & ">x<" & oWidth1 & ">x<" & oLength1 & ">"

iProperties.Value("Project", "Part Number") = ovalue

I hope you find it useful greetings


Please accept as solution and give likes if applicable.

I am attaching my Upwork profile for specific queries.

Sergio Daniel Suarez
Mechanical Designer

| Upwork Profile | LinkedIn

0 Likes
Message 3 of 3

jwitt1983
Enthusiast
Enthusiast

I slightly modified to meet my needs but your answer got me there. Thank you!