Planning for Automation Success in Autodesk Inventor - Parts Edition


Recently I've been inspired by conversations I've been having within the Autodesk Community centered around the challenges of starting automation, taking that initial step, and automating designs that are already established. Today I will explore the essential aspects of planning for automation, with a particular focus on laying down the foundational blocks for achieving seamless part automation. From understanding and mastering WorkPlanes to integrating parameters and iProperties, effective planning serves as the cornerstone for unlocking exceptional efficiency in design workflows.


Planning is Everything


In the dynamic world of design and engineering, embracing automation in Autodesk Inventor is not just a choice; it's a necessity. As the renowned saying goes, "If you fail to plan, you are planning to fail." This rings especially true when venturing down the path of automation. In this blog post, we will examine the crucial aspects of planning for automation, with a focus on the foundational building blocks for part automation in Autodesk Inventor.




In the realm of automation planning, WorkPlanes emerge as a crucial piece of the puzzle, laying the foundation for streamlined processes. While automation encompasses various elements, the creation and utilization of planes stand out as particularly significant. Establishing a standardized naming scheme for these planes becomes a pivotal aspect of ensuring a cohesive and efficient workflow for your parts and assemblies.


In this discussion, we emphasize the importance of defining a consistent naming convention for WorkPlanes. For instance, consider starting with a prefix like "PLANE" and concluding with a descriptor that highlights the plane's function or location. This standardized approach ensures clarity and uniformity across all parts, facilitating easy identification and understanding.


The key lies in maintaining consistency. These named planes should adhere to a uniform structure throughout all created parts, establishing a harmonious system. This not only simplifies the identification process but also enhances the automation potential by promoting predictability.


Equally crucial is the origin point's determination. Starting these planes from the origin planes and strategically placing the origin point in all parts and assemblies early on becomes a fundamental decision. This early consideration ensures that the entire automation process unfolds seamlessly, creating a robust foundation for future developments.





In certain scenarios, WorkPlanes alone may suffice as the primary additional work features. However, considering the assembly connections and visualizing the components on a larger scale is crucial. In such instances, incorporating extra WorkPoints becomes essential. These WorkPoints are positioned at the intersection of three WorkPlanes, ensuring they dynamically adjust with the movement of the associated WorkPlanes. Establishing this kind of automation that interconnects work features is key.


Additionally, WorkPoints prove highly useful in the area of drawing automation. The utilization of WorkPoints and WorkPlanes can yield significant benefits when venturing into the domain of drawing automation.





Formulating parameters marks the subsequent phase in design automation. In the upcoming sections, new parameters will be generated, emphasizing the significance of standardizing the naming conventions for these parameters. Maintaining consistency in naming schemes is crucial, particularly when employing common parameters across various components. This attention to detail in parameter nomenclature plays a pivotal role in facilitating effective automation processes.



Parameters Driving WorkPlanes


Establishing a connection between the WorkPlanes and parameters is a vital step in the process. This linkage ensures that as we construct the model geometry, any movement in the parameters will automatically translate to corresponding adjustments in the model geometry. Each WorkPlane is assigned either a zero position or is influenced by a specific parameter. For instance, the LENGTH parameter is currently linked to the PLANE OUT position within the part model. This interconnection between parameters and WorkPlanes is instrumental in maintaining the dynamic responsiveness of the model to evolving design criteria.


Sketch and Model Geometry


In the forthcoming videos, the demonstration will showcase the step-by-step process of creating sketches and model geometry using projected WorkPlanes. The focus will be on crafting a body extrusion alongside additional handle features, integrating a sweep command to enhance complexity. It's important to note that in this approach, sketch geometry is intentionally drawn away from existing model features. This precautionary measure aims to prevent inadvertent auto-projection of model geometry, as such instances can result in unforeseen consequences.






Organize Model Tree and Parameters


Naming features and sketches according to their representation is a valuable practice in model organization. Similarly, naming WorkPlanes in the parameters window with underscores instead of spaces ensures compatibility for future use in user parameters. This proactive naming approach facilitates seamless integration of parameters, enhancing model organization and preparing it for potential automation. Despite often overlooked, organizing the model is pivotal for streamlining the design process and ensuring efficient automation workflows.



Example Business Logic


Understanding the business logic is crucial before diving into automation. It's essential to clarify and understand the objectives the model needs to achieve. Are there external factors that can be predefined for any scenario, ensuring model stability even with evolving business logic? Taking the time to explore various scenarios beforehand is advisable for effective modeling.


JKL-48-60-R 48 60 RH 12 6 6 3
JKL-48-60-L 48 60 LH 12 6 6 3
JKL-48-60-B 48 60 BOTH 12 6 6 3
JKL-48-60-N 48 60 NONE 12 6 6 3
JKL-48-120-R 48 120 RH 12 6 6 3
JKL-48-120-L 48 120 LH 12 6 6 3
JKL-48-120-B 48 120 BOTH 12 6 6 3
JKL-48-120-N 48 120 NONE 12 6 6 3
TJY-36-60-R 36 60 RH 6 3 3 2.5
TJY-36-60-L 36 60 LH 6 3 3 2.5
TJY-36-60-B 36 60 BOTH 6 3 3 2.5
TJY-36-60-N 36 60 NONE 6 3 3 2.5
TJY-36-120-R 36 120 RH 6 3 3 2.5
TJY-36-120-L 36 120 LH 6 3 3 2.5
TJY-36-120-B 36 120 BOTH 6 3 3 2.5
TJY-36-120-N 36 120 NONE 6 3 3 2.5
ATQ-60-60-R 36 60 RH 8 4 2.5 2.5
ATQ-60-60-L 36 60 LH 8 4 2.5 2.5
ATQ-60-60-B 36 60 BOTH 8 4 2.5 2.5
ATQ-60-60-N 36 60 NONE 8 4 2.5 2.5
ATQ-60-120-R 36 120 RH 8 4 2.5 2.5
ATQ-60-120-L 36 120 LH 8 4 2.5 2.5
ATQ-60-120-B 36 120 BOTH 8 4 2.5 2.5
ATQ-60-120-N 36 120 NONE 8 4 2.5 2.5






The concept of iProperties revolves around their judicious use. They should encompass essential properties that users need to control parts. While you can define as many as necessary, it's beneficial if values can be inferred from iProperties. For instance, we'll leverage the "MODEL" iProperty to dictate the entire design in this example. Often, information like model or part numbers can serve as the basis for defining the entire model geometry structure.


iLogic Form & Rule Creation


When creating the form, consideration is given to adding the necessary iProperties and corresponding rules for seamless functionality. In this instance, emphasis is placed on incorporating the "MODEL" iProperty and creating the "Drive Model" rule, which is also integrated into the form as an accessible option. This streamlined approach ensures smooth execution of the iLogic code, facilitating easy model control during testing.


iLogic Code


In this code example, we demonstrate the power of leveraging a single property to influence multiple values that define the geometry of a model. It highlights how iProperties and Parameters can be used in a versatile manner, not restricted to a one-to-one relationship. By strategically utilizing iProperties, we can efficiently drive a myriad of model geometry options, reducing the need for manual adjustments by the user. This approach emphasizes the importance of thoughtful iProperty utilization to maximize the flexibility of model geometry. By intelligently linking properties to various parameters, we streamline the design process, empowering users to achieve desired outcomes with minimal manual intervention.




	Dim partDoc As PartDocument = ThisApplication.ActiveDocument 
	Dim partDef As PartComponentDefinition = partDoc.ComponentDefinition 
	' iProperties
	Dim model As String = iProperties.Value("Custom", "MODEL")
	Dim modelSplit As String() = model.Split("-"c)
	Dim modelDictionary As New Dictionary(Of String, String)

	modelDictionary.Add("TYPE", modelSplit(0))
	modelDictionary.Add("WIDTH", modelSplit(1))
	modelDictionary.Add("LENGTH", modelSplit(2))
	modelDictionary.Add("HANDLE HAND", modelSplit(3))
	Dim type As String = modelDictionary.Item("TYPE")
	Dim width As String = modelDictionary.Item("WIDTH")
	Dim length As String = modelDictionary.Item("LENGTH")
	Dim handleHand As String = modelDictionary.Item("HANDLE HAND")
	If length <> "" Then Parameter.Param("LENGTH").Expression = length
	If width <> "" Then Parameter.Param("WIDTH").Expression = width
	Dim mirrorFeature As MirrorFeature
	Dim mirrorDef As MirrorFeatureDefinition
	Dim modelFeature As PartFeature
	Dim sweepFeature As SweepFeature 
	For Each modelFeature In partDef.Features
		If TypeOf modelFeature Is MirrorFeature Then 
			mirrorFeature = modelFeature
		ElseIf TypeOf modelFeature Is SweepFeature Then 
			sweepFeature = modelFeature
		end if 
	mirrorDef = mirrorFeature.Definition 
	Dim isOriginalRemoved As Boolean = False 
	Dim isMirrorSuppressed As Boolean = False 
	Dim isSweepSuppressed As Boolean = False 
	Select Case handleHand 
	Case "L" 
		isOriginalRemoved = True
	Case "R"
		isMirrorSuppressed= True 
	Case "N" 
		isSweepSuppressed = True 
		isMirrorSuppressed = True 
	End Select 
	mirrorDef.RemoveOriginal = isOriginalRemoved 'HAVE TO USE THE MIRROR DEFINITION TO GET TO THIS PROPERTY
	sweepFeature.Suppressed = isSweepSuppressed
	mirrorFeature.Suppressed = isMirrorSuppressed
	Dim height As String = "12"
	Dim handleGap As String = "6"
	Dim handleEndOffset As String = "6"
	Dim handleOffsetTop As String = "3"
	Select Case type 
	Case "JKL"
	Case "TJY"
		height = "6"
		handleGap = "3"
		handleEndOffset = "3"
		handleOffsetTop = "2.5"
	Case "ATQ"
		height = "8"
		handleGap = "4"
		handleEndOffset = "2.5"
		handleOffsetTop = "2.5"
	End Select 
	If height <> "" Then Parameter.Param("HEIGHT").Expression = height
	If handleGap <> "" Then Parameter.Param("HANDLE_GAP").Expression = handleGap
	If handleEndOffset <> "" Then Parameter.Param("HANDLE_OFFSET_END").Expression = handleEndOffset
	If handleOffsetTop <> "" Then Parameter.Param("HANDLE_OFFSET_TOP").Expression = handleOffsetTop	
	iLogicVb.UpdateWhenDone = True



iLogic Rule


Incorporating the provided code into the existing rule will demonstrate how it drives the model according to the previously outlined business logic.



Code Clarity


Document Setup: We begin by accessing the active document in Autodesk Inventor to work on.

iProperties Handling: Next, we retrieve the value of a specific iProperty called "MODEL". iProperties store custom information about the model.

Model Dictionary Creation: The value of "MODEL" is split into different parts using a hyphen as a separator. These parts are stored in a dictionary for easy access.

Variable Definition: Variables are created to represent different aspects of the model, such as type, width, length, and handle hand, based on the dictionary entries.

Parameter Expression Setting: The values extracted from the dictionary are used to set expressions for specific parameters that control the model's dimensions.

Feature Identification: We loop through the features of the model to find specific types of features, such as MirrorFeature and SweepFeature.

Feature Control: Based on the value of the "HANDLE HAND" property, certain features are controlled, such as removing the original in mirror features or suppressing sweep features.

Parameter Setting Based on Model Type: Additional parameters are set based on the type of model, with different values assigned for different types.

Parameter Expression Assignment: The values for these additional parameters are assigned to their expressions if they exist.

Model Update: Finally, we ensure that the model is updated after all modifications have been made, ensuring that changes take effect.




In this comprehensive exploration of automation in Autodesk Inventor, we've underscored the critical role of meticulous planning. From the fundamental aspects of WorkPlanes to the intricate integration of parameters and iProperties, every step lays the groundwork for seamless part automation. By adhering to standardized naming conventions, establishing dynamic connections between WorkPlanes and parameters, and leveraging iProperties to drive model geometry, we pave the way for unparalleled efficiency and productivity in design workflows. Through thoughtful organization and strategic utilization of automation tools like iLogic, we empower users to navigate complex design challenges with ease, ultimately unlocking the full potential of automation in Autodesk Inventor.


All finished files and reference information can be found on GitHub here.