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: 

Update user parameter with ilogic

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
kolesaa
1188 Views, 5 Replies

Update user parameter with ilogic

Hi All

Is it possible to update an existing User Parameter. While I can only  delete-create a new. In this case the connection is lost with BOMQuantity.

 

 

5 REPLIES 5
Message 2 of 6
rjay75
in reply to: kolesaa

Are you looking to just update an User Parameter?

 

If so in iLogic it's just a statement consisting of

 

ParameterName = 1 in

 If you're looking to update BOMQuantity with a parameter value then its

 

ThisDoc.Document.ComponentDefinition.BOMQuantity.SetBaseQuantity( BOMQuantityTypeEnum.kParameterBOMQuantity, Parameter.Param("d0") )
d0 = 14 in

 

Message 3 of 6
kolesaa
in reply to: rjay75

Thanks, Thomas. I decided so:

 

If param.Expression="0 m" And param.Units="m" Then

  param.Units="mm"
  param.Expression="0 mm"

  Dim quantityType As BOMQuantityTypeEnum
  Dim quantity As Object = Nothing
  oCompDef.BOMQuantity.GetBaseQuantity(quantityType, quantity)
  oCompDef.BOMQuantity.SetBaseQuantity(quantityType, quantity)

End If

 

fstrmat.png

 

Message 4 of 6
Anonymous
in reply to: rjay75

I am trying assign a qty parameter to my Bill of Materials column FT/QTY.
Each item in this column has either cut size multiplied by QTY, or just QTY. Equation " =<EXTR> * <QTY>" not working. BOM field comes as this ".146 *" which .146 is <EXTR> parameter.
Please help.

Message 5 of 6
rjay75
in reply to: Anonymous

Akap47,

 

It may be easier to just set youe BOM Qty to the parameter EXTR. Then using iLogic modify the equation of the EXTR parameter. The BOM Qty field itself cannot contain an equation but setting it to a parameter that has the equation will serve the same purpose.

Message 6 of 6
Anonymous
in reply to: rjay75

Thanks for prompt replay.
Seems to me it's not working again.
First I created User Parameters.
[cid:image002.jpg@01CF15D6.DD909B20]
Than:
[cid:image004.gif@01CF15D6.AD51AF30]
Than:
[cid:image005.gif@01CF15D6.AD51AF30]
Than:
[cid:image006.gif@01CF15D6.DD909B20]
What I did wrong?
Regards.

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

Post to forums  

Autodesk Design & Make Report