Inventor 2011 Tutorials
iLogic Vessel - Part 2
CADD Management Solutions Head Development
Part 2 of the iLogic Vessel Tutorial will guide you through the steps required in
developing an iLogic vessel in Inventor 2011, focusing on Head Development.
The objective will be to create heads that can be controlled through simple
iLogic code. Once complete, you will understand how to use parameters,
dimensions and feature names to create intelligent iLogic components for use
in vessel assemblies. The seven head types you will create are
Conical Head
Diffuser Head
Ellipsoidal Head
Flat Head
Hemispherical Head
Torispherical Head (0.1 Dish Radius factor)
Torispherical Head (0.85 Dish Radius Factor)
Create a new part using %ProgramFiles%\Autodesk\Inventor
2011\Templates\Vessels\vessel.ipt as the template. Save the file as Head.ipt.
You can download the files here. Extract the contents to the iLogicTutorial
workspace.
#95 Millbank Rd Southwest
Calgary, Alberta · T2Y 2Y9
Phone: 403.238.2758 ·Fax 403.238.8758 ·Cell: 403.612.4438
Website: www.camansol.com · Email: info@camansol.com
Head Parameter Configuration
Head Parameter Configuration
1. Open the Parameters Dialog box
a. Add Lip Dimension for Conical and Torispherical Heads
i. Click Add Numeric
ii. Parameter Name: LIP
iii. Unit/Type: in
iv. Equation: 1
v. Key: Unchecked
vi. Export: Checked
vii. Comment: Lip Dimension
b. Add Dish Radius Factor (torispherical heads)
i. Click Add Numeric
ii. Parameter Name: DRFAC
iii. Unit/Type: ul (unitless)
iv. Equation: 0.85
v. Key: Unchecked
vi. Export: Unchecked
vii. Comment: Dish Radius Calculation Factor
Page 2 of 13
Head Parameter Configuration
c. Add Knuckle Radius Factor (conical and torispherical heads)
i. Click Add Numeric
ii. Parameter Name: KRFAC
iii. Unit/Type: ul (unitless)
iv. Equation: 0.154
v. Key: Unchecked
vi. Export: Unchecked
vii. Comment: Knuckle Radius Calculation Factor
d. Click Done.
Your Parameters Dialog box should look like the one in the diagram.
Page 3 of 13
Define Vessel Head Features
Define Vessel Head Features
The next step is to define the types of heads we placed in the Parameter
Table. In the interest of consistency, all sketches should be defined on the
same work plane. In this tutorial, all sketches will be placed on the XY Plane,
with the X-Axis projected as a regular line, and the Y-Axis projected as a
centerline. A collinear constraint will be placed between the weld face of the
head and the X-Axis.
Conical
1. Rename Sketch1 to skConical
2. Redefine sketch to the XY Plane
3. Create the following sketch
4. Finish the sketch, and revolve the profile
around the Y-Axis
5. Rename the Revolved feature to Conical
6. Place two Opposed Insert iMates on the weld
face of the head
7. Rename them
both Vessel
8. Suppress the
Conical Feature
Page 4 of 13
Define Vessel Head Features
Diffuser
1. Create a new sketch on the XY Plane
2. Rename the sketch to skDiffuser
3. Create the following sketch
4. Finish the sketch, and revolve the profile
around the Y-Axis
5. Rename the Revolved feature to Diffuser
6. Place two Opposed Insert iMates on the weld face of the head
7. Rename them both Vessel
8. Suppress the Diffuser feature.
Page 5 of 13
Define Vessel Head Features
Ellipsoidal
1. Create a new sketch on the XY Plane
2. Rename the sketch to skEllipsoidal
3. Create the following sketch
4. Finish the sketch, and revolve the profile
around the Y-Axis
5. Rename the Revolved feature to Ellipsoidal
6. Place two Opposed Insert iMates on the weld face of the head
7. Rename them both Vessel
8. Suppress the Ellipsoidal feature.
Page 6 of 13
Define Vessel Head Features
Flat
1. Create a new sketch on the XY Plane
2. Rename the sketch to skFlat
3. Create the following sketch
4. Finish the sketch, and revolve the profile around
the Y-Axis
5. Rename the Revolved feature to Flat
6. Place two Opposed Insert iMates on the weld face of the head
7. Rename them both Vessel
8. Suppress the Flat Feature.
Page 7 of 13
Define Vessel Head Features
Hemispherical
1. Create a new sketch on the XY Plane
2. Rename the sketch to skHemispherical
3. Create the following sketch
4. Finish the sketch, and revolve the profile around
the Y-Axis
5. Rename the Revolved feature to Hemispherical
6. Place two Opposed Insert iMates on the weld face of the head
7. Rename them both Vessel
8. Suppress the Hemispherical feature
Page 8 of 13
Define Vessel Head Features
Torispherical
1. Create a new sketch on the XY Plane
2. Rename the sketch to skTorispherical
3. Create the following sketch
4. Finish the sketch, and revolve the profile around
the Y-Axis
5. Rename the Revolved feature to Torispherical
6. Place two Opposed Insert iMates on the weld face of the head
7. Rename them both Vessel
8. Suppress the Torispherical feature
Page 9 of 13
iLogic Code
iLogic Code
We are now ready to write the iLogic code for the head.
1. Add a new rule (Manage->Add Rule)
a. Rule Name: HeadCalcs
i. The interface
(1) Code Snippets
Contains all the functions, methods, and properties available in
the programming interface
Page 10 of 13
iLogic Code
(2) Model Properties, Features, and Parameters
Allows access to all the part properties, features, and parameters
(a) Right-click an item in the list to insert it’s current state in to
the code area
(3) Options Tab
Controls how the illogic code is executed
(4) Search and Replace Tab
Search and Replace text in the Code Window
Page 11 of 13
iLogic Code
(5) Wizards Tab
Various wizards to aid in developing a new or modifying existing
iLogic Code
ii. Writing the Code
(1) Ensure that all Features are suppressed.
Feature.IsActive("<FeatureName>") = False
This can easily be done by clicking the feature in the model tree and selecting Capture
Current State. Keep only the Feature.IsActive(<FeatureName>) = False lines.
(2) Unsuppress Selected Head Type and set required parameters
If <Property> = "<FeatureName>" then
‘set <FeatureName> IsActive property to true
‘set required dimensional properties
‘set Part Number Prefix, optional
‘set Part Description Text, optional
ElseIf … then
…
ElseIf … then
…
End If
(3) Define Part Number and Description, optional
iProperties.Value(“Project”, “Part Number”) =
"<CustomPartNumber>”
iProperties.Value(“Project”, “Description”) =
"<CustomPartDescription>”
This concludes the Head Development tutorial. In Part Three, we will design
the Shell.
Page 12 of 13
iLogic Code
' Suppress all features
Feature.IsActive("Conical") = False
Feature.IsActive("Diffuser") = False
Feature.IsActive("Ellipsoidal") = False
Feature.IsActive("Flat") = False
Feature.IsActive("Hemispherical") = False
Feature.IsActive("Torispherical") = False
'Unsuppress selected Head Type, and set the required parameters
If Type = "Conical" Then
Feature.IsActive("Conical") = True
KRFAC = 0.154 ul
PNP = "HCA"
PDT = "CONICAL"
ElseIf Type="Diffuser" Then
Feature.IsActive("Diffuser") = True
DRFAC = 0.85 ul 'Dish Radius Factor
KRFAC = 0.154 ul
PNP = "HDA"
PDT = "DIFFUSER"
ElseIf Type="Ellipsoidal" Then
Feature.IsActive("Ellipsoidal") = True
PNP = "HEA"
PDT = "ELLIPSOIDAL"
ElseIf Type="Flat" Then
Feature.IsActive("Flat") = True
PNP = "HFA"
PDT = "FLAT"
ElseIf Type="Hemispherical" Then
Feature.IsActive("Hemispherical") = True
PNP = "HHA"
PDT = "HEMISPHERICAL"
ElseIf Type="Torispherical 0.1" Then
Feature.IsActive("Torispherical") = True
DRFAC = 1 ul
KRFAC = 0.1 ul
PNP = "HTA"
PDT = "TORISPHERICAL 0.1"
ElseIf Type="Torispherical 0.8" Then
Feature.IsActive("Torispherical") = True
DRFAC = 0.85 ul
KRFAC = 0.154 ul
PNP = "HTB"
PDT = "TORISPHERICAL 0.8"
End If
iProperties.Value("Project", "Part Number") = PNP & OD & THK
iProperties.Value("Project", "Description") = "HEAD " & PDT & " " &
OD & Chr(34) & " x " & THK & Chr(34)
Page 13 of 13