iLogic to change the unit precision of all Frame Generator members in Document Settings

iLogic to change the unit precision of all Frame Generator members in Document Settings

jerick.j
Explorer Explorer
403 Views
1 Reply
Message 1 of 2

iLogic to change the unit precision of all Frame Generator members in Document Settings

jerick.j
Explorer
Explorer

I was wondering if anyone could help develop an iLogic script that could:

  1. Change the Linear Dim Display Precision of every member in a frame to "0." instead of the default "3.123". (see attached image)
  2. Change the Base Quantity to the "G_L" parameter (see attached image)

 

I usually need to go into each individual frame member file and manually change the precision which can be very time consuming when there are a lot of members.

 

 

 

 

0 Likes
404 Views
1 Reply
Reply (1)
Message 2 of 2

basautomationservices
Advocate
Advocate

Hi there, as far as I know the G_L parameter should already be the default Base Quantity for Frame generator items. I also don't know if FG will overwrite the things you edit but, you can change the base quantity like this, once you retrieved the parameter.

 

oCompDef.BOMQuantity.SetBaseQuantity(BOMQuantityTypeEnum.kParameterBOMQuantity, oUserParam)

 

The precision and other settings is also changeable. You need to access the CustomPropertyFormat property of the parameter. 

 

Dim f As CustomPropertyFormat = oParam.CustomPropertyFormat

If f.PropertyType <> CustomPropertyTypeEnum.kNumberPropertyType Then f.PropertyType = CustomPropertyTypeEnum.kNumberPropertyType

If f.Precision <> CustomPropertyPrecisionEnum.kZeroDecimalPlacePrecision Then f.Precision = CustomPropertyPrecisionEnum.kZeroDecimalPlacePrecision

If f.ShowUnitsString Then f.ShowUnitsString = False

 

Contact me for custom app development info@basautomationservices.com. Follow below links to view my Inventor appstore apps.

Free apps: Smart Leader | Part Visibility Utility | Mate Origins

Paid apps: Frame Stiffener Tool | Constrain Plane Toggle | Property Editor Pro


0 Likes