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: 

Problem with ilogic and paramters

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
wjk221
286 Views, 4 Replies

Problem with ilogic and paramters

So I have made an enclosure and used ilogic to change the size, pretty basic. But everytime I unsupress the rule it changes the parameters length,width and height to 0 and wont let me change them. The code is here:

 

Length = ilength
Width = iwidth
Height = iheight

'Bottom
Parameter("Bottom:1", "Length")=ilength
Parameter("Bottom:1", "Width")=iwidth

'Back wall
Parameter("Back Wall:1", "Height")=iheight
Parameter("Back Wall:1", "Width")=iwidth

'Top
Parameter("Top:1", "Length")=ilength
Parameter("Top:1", "Width")=iwidth

'Side Panels
Parameter("Side Panel:1", "Height")=iheight
Parameter("Side Panel:1", "Length")=ilength

'Middle Wall
Parameter("Middle Wall:1", "Height")=iheight
Parameter("Middle Wall:1", "Width")=iwidth

 Any help would be greatly appreciated

4 REPLIES 4
Message 2 of 5
rjay75
in reply to: wjk221

Length = ilength
Width = iwidth
Height = iheight

 

What is ilength, iwidth, iheight? Are they parameters or just variables? If they are just variables they're default value when the rule runs is 0. Where are the values set at?

Message 3 of 5
wjk221
in reply to: rjay75

They are just variables, Length, Width, and Height are the user parameters which can be set in either a from or in the parameters menu

 

Message 4 of 5
rjay75
in reply to: wjk221

Then at the very beginning you are setting your parameters to 0 when the rule starts. The variables have a default value of 0 and you're not setting a value to them.

It should look like this at the beginning

 

ilength = Length
iwidth = Width
iheight = Height

Then you're setting the variables to the values of the parameters at the start.

Message 5 of 5
wjk221
in reply to: rjay75

Thank you that worked, something so simple.......

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

Post to forums  

Autodesk Design & Make Report