ilogic part array

ilogic part array

jam_bhatti
Enthusiast Enthusiast
602 Views
4 Replies
Message 1 of 5

ilogic part array

jam_bhatti
Enthusiast
Enthusiast

I am working on Vessel Shell assembly with variable shell height and wall thickness using ilogic, and i am trying this using array tool. can any one help me how i define perameter in array using ilogic to allow me different height and wall thickness in array. 

 

Component key names are

 

Shell Diameter = ID

Shell Height = HT

Shell wall Thickness = THK

 

Array tool using column number of shell n=4 or 5 or 6 etc.

 

 

Does anyone know to do this with ilogic?

0 Likes
603 Views
4 Replies
Replies (4)
Message 2 of 5

Curtis_Waguespack
Consultant
Consultant
0 Likes
Message 3 of 5

Vladimir.Ananyev
Alumni
Alumni

Attached assembly uses Cylinder.ipt to create the rectangular pattern  (Inventor 2015 format).

Open the user form and define Diameter, wall thickness, Section length, and Number of Sections, then press UpdatePattern button.
New values will be applied to the section model and the pattern.

 

Control Form.PNG

 

'read input values, defined via form
NSections = Parameter("NumberOfSections") 
Th = Parameter("Thickness") 
SectionL = Parameter("SectionLength")
Dia = Parameter("Diameter")

'you may implement some checking here 
'before applying parameters to the model
'---


'parameters are correct
'update the section part
Parameter("Cylinder.ipt", "Length") = SectionL
Parameter("Cylinder.ipt", "Thickness") = Th
Parameter("Cylinder.ipt", "DiaOuter") = Dia

'update the rect. pattern
Parameter("Spacing") = SectionL + 5  'remove this “5mm” – it’s for the visibility purpose only
Parameter("NN") = NSections

'apply parameters in the active assembly
RuleParametersOutput()
'update this assembly
InventorVb.DocumentUpdate()

Hope this “Top – Down” logic is quite clear and you will be able to adjust this code to suit your specific needs.

Cheers,


Vladimir Ananyev
Developer Technical Services
Autodesk Developer Network

0 Likes
Message 4 of 5

jam_bhatti
Enthusiast
Enthusiast
Thanks Vladimir

The diameter remain same, only height and thickness of wall (Shell) value need to be change in pattern levels.

Please view my other post

http://forums.autodesk.com/t5/inventor-general-discussion/ilogic-part-array/td-p/5577075
0 Likes
Message 5 of 5

Vladimir.Ananyev
Alumni
Alumni

If you do not need to change diameter then simply remove iLogic code lines (two lines)
that read value and update the diameter in the cylinder part.


Vladimir Ananyev
Developer Technical Services
Autodesk Developer Network

0 Likes