iLogic form

iLogic form

JorisSteurs1246
Advocate Advocate
1,607 Views
10 Replies
Message 1 of 11

iLogic form

JorisSteurs1246
Advocate
Advocate

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

0 Likes
Accepted solutions (1)
1,608 Views
10 Replies
Replies (10)
Message 2 of 11

GosponZ
Collaborator
Collaborator

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

0 Likes
Message 3 of 11

rjay75
Advisor
Advisor

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

 

0 Likes
Message 4 of 11

JorisSteurs1246
Advocate
Advocate

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 :-).

 

0 Likes
Message 5 of 11

rjay75
Advisor
Advisor

To go the other way create another rule with this

 

SheetMetal.SetActiveStyle(paramName)

 When the parameter is update it should set the style.

0 Likes
Message 6 of 11

JorisSteurs1246
Advocate
Advocate
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)
0 Likes
Message 7 of 11

rjay75
Advisor
Advisor
Accepted solution
Message 8 of 11

JorisSteurs1246
Advocate
Advocate
Tried this also, even added a document update rule, but the model keep his
thickness stubborn as it is.
0 Likes
Message 9 of 11

rjay75
Advisor
Advisor

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,

0 Likes
Message 10 of 11

JorisSteurs1246
Advocate
Advocate
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 🙂
0 Likes
Message 11 of 11

Anonymous
Not applicable

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

0 Likes