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 form

10 REPLIES 10
SOLVED
Reply
Message 1 of 11
JorisSteurs1246
899 Views, 10 Replies

iLogic form

Does anyone knows if it is possible to add the selectionbox for the sheetmetal rule on an ilogic Form ?

Or if not possible, maybe some kinda workaround?

 

thanks

Joris

Tags (2)
10 REPLIES 10
Message 2 of 11
GosponZ
in reply to: JorisSteurs1246

Maybe tabs, i do have my rules dwg ipt and iam rules on different tabs. Working great. Just my 2 cents

Message 3 of 11
rjay75
in reply to: JorisSteurs1246

If the file is a Sheet Metal file this will fill a Text parameter with the sheetmetal styles. That parameter can then be added to a an iLogic form.

 

Dim smStyleList As New ArrayList

For Each smStyle As SheetMetalStyle In ThisDoc.Document.ComponentDefinition.SheetMetalStyles
	smStyleList.Add(smStyle.Name)
Next smStyle

MultiValue.List("paramName") = smStyleList

 

Message 4 of 11
JorisSteurs1246
in reply to: rjay75

Thanks Rjay for this snippet, it works, and I have a slectable list  on my form. Unfortunatly it goes only one way, the part doesn't change when selecting a new SheetStyle. That was actualy my aim. Maybe should have put my question a bit more precise :-).

 

Tags (2)
Message 5 of 11
rjay75
in reply to: JorisSteurs1246

To go the other way create another rule with this

 

SheetMetal.SetActiveStyle(paramName)

 When the parameter is update it should set the style.

Message 6 of 11
JorisSteurs1246
in reply to: rjay75

Sorry to say but that last line didn't do the update.
This is what the total iLogic looks like right now.


Dim smStyleList As New ArrayList
For Each smStyle As SheetMetalStyle In
ThisDoc.Document.ComponentDefinition.SheetMetalStyles
smStyleList.Add(smStyle.Name)Next smStyle
MultiValue.List("SheetMetalType") = smStyleList
SheetMetal.SetActiveStyle(SheetMetalType)
Message 7 of 11
rjay75
in reply to: JorisSteurs1246
Message 8 of 11
JorisSteurs1246
in reply to: rjay75

Tried this also, even added a document update rule, but the model keep his
thickness stubborn as it is.
Message 9 of 11
rjay75
in reply to: JorisSteurs1246

Hmm. I have gotten to work with two rules. The first rule looks like this.

 

Dim smStyleList As New ArrayList

For Each smStyle As SheetMetalStyle In ThisDoc.Document.ComponentDefinition.SheetMetalStyles
    smStyleList.Add(smStyle.Name)
Next smStyle

MultiValue.List("SheetMetalType") = smStyleList

 

The second rule looks like this.

 

SheetMetal.SetActiveStyle(SheetMetalType)

 Each of these are regular rules.

I tested this on Inventor 2014. What version of Inventor are you running?

 

One thing to note is in the document I tested this it initially appeared not to work but it was because in the sheet metal defaults I didn't have Use Thickness From Rule checked,

Message 10 of 11
JorisSteurs1246
in reply to: rjay75

Yes AI 2014 latest service pack.

Aaaand I got it working now. The problem was that I used external rules,
just a habit of mine to avoid making new templates all the time.
Strange though.... If I made it a normal rule it works fine , I'm going to
save both rules in the file and try if it still works when I trigger the
second rule on parameter change.

Anyhow already big thanks 🙂
Message 11 of 11

Hi all

 

I want to know if any of you had the experience of an smart form, for example consider a form with woth some parametes, as you can see in the attached picture, my first field, is a drop down menue showing the location of a nozzle, which might be located on top, shell or bottom of a tank, I want to be able to gray out some fields when I choose for example top situation, so, the grayed fields are not accessible and the user cannot write anything in those fields.

 

Thanks

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

Post to forums  

Autodesk Design & Make Report