Planning for Automation Success in Autodesk Inventor - Parts Edition

autodesk-inventor-professional-badge-2048px.jpg

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.

 

WorkPlanes

 

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.

 

 

WorkPoints

 

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.

 

 

Parameters

 

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.

 

Model WIDTH LENGTH HANDLE HAND HEIGHT HANDLE GAP HANDLE END OFFSET HANDLE TOP OFFSET
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

 

Tiffany_Hayden__0-1711027450184.png

 

iProperties

 

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.

 

 

 

 

 

 

	'*********************************************************************************
	' DOCUMENT
	'*********************************************************************************
	Dim partDoc As PartDocument = ThisApplication.ActiveDocument 
	Dim partDef As PartComponentDefinition = partDoc.ComponentDefinition 
	
	'*********************************************************************************
	' iProperties
	'*********************************************************************************
	Dim model As String = iProperties.Value("Custom", "MODEL")
	
	'*********************************************************************************
	' MODEL DICTIONARY
	'*********************************************************************************
	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))
	
	'*********************************************************************************
	' CREATING VARIABLES AND LETTING THE DICTIONARY DEFINE THEM
	'*********************************************************************************	
	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")
	
	'*********************************************************************************
	' PUSHING DICTIONARY VALUES INTO PARAMETER EXPRESSIONS
	'*********************************************************************************
	If length <> "" Then Parameter.Param("LENGTH").Expression = length
	If width <> "" Then Parameter.Param("WIDTH").Expression = width
			
	'*********************************************************************************
	' FINDING FEATURES BY TYPE
	'*********************************************************************************
	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 
	Next 
	
	mirrorDef = mirrorFeature.Definition 
	
	'*********************************************************************************
	' CONTROLLING HANDLE FEATURES SO THAT THE HANDLE HAND 
	' IS CORRECT. 
	'*********************************************************************************
	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
	
	'*********************************************************************************
	' SET VALUES FOR THE REMAINING PARAMETERS THAT ARE CONTROLLED BY THE MODEL TYPE
	'*********************************************************************************
	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"
		'DEFAULTS SET ABOVE
	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 
		
	'*********************************************************************************
	' PUSHING VALUES INTO THE PARAMETER EXPRESSIONS
	'*********************************************************************************		
	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	
	
	'*********************************************************************************
	' UPDATE MODEL
	'*********************************************************************************	
	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.

 

Conclusion

 

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.

 

Webinar

 

On August 5th, I had the pleasure of hosting a webinar where I explored the same material covered in this blog. This session was part of the KETIV Virtual Academy (KVA), a platform dedicated to providing valuable resources and insights to professionals in the field. If you're looking to deepen your understanding or revisit the concepts discussed, I highly recommend watching the recording available on YouTube.

 

 Webinar: https://youtu.be/iiyyB2ZJfBc?si=smiBLE42GacTyDMV

 

Thank you for watching, and I hope both this blog and the webinar provide you with the tools and knowledge needed to succeed in your automation endeavors.

 

19 Comments
handjonathan
Community Manager

Thank you, @Tiffany_Hayden_ Great first blog 😀

Tiffany_Hayden_
Collaborator

Thank you @handjonathan

Boorda
Advocate

Great post @Tiffany_Hayden_ . 👍

Tiffany_Hayden_
Collaborator

Thanks Addam! @Boorda 

PaulMunford
Community Manager

Great post - thank you for the detailed information!

Tiffany_Hayden_
Collaborator

Thanks @PaulMunford!

BrandonBibelhauser
Participant

Very well done @Tiffany_Hayden_ !

Tiffany_Hayden_
Collaborator

Thanks so much Brandon! @BrandonBibelhauser 

alexanderboogaard
Enthusiast

Thanks @Tiffany_Hayden_  ! Very clear and concise blog. Really valuable information. Looking forward to your next posts in this series (at least I hope they are coming).

Tiffany_Hayden_
Collaborator

@alexanderboogaard thanks so much! Yes my plan is to do an assembly and drawings edition as well. 

chris
Advisor

Great breakdown, I would like to suggest an alternative to naming/renaming of the "model Parameter"; that the user instead add "User Parameters", as the "user parameters" will continue to exist if the feature that the "model parameter" is tied to, is deleted. Once the "user parameters" are created, they can copy/paste the "user parameter" name into the Equation field.

 

Tiffany_Hayden_
Collaborator

Thanks @chris - I haven't seen that approach before, but I'm open to learn more! My biggest influence in this is actually naming the parameter and not keeping the d# and then referencing the d# in the code. Using the d# in the code gives no reference to even what that parameter is. I think either way naming the parameter something is better than keeping it the standard d# so there is some clarity in the logic. Thanks for the response! 

chris
Advisor

@Tiffany_Hayden_ I agree, I open models every day with tons of Parameters and no "info" to be found anywhere. I name almost all my parameters, so the person after me has it easy.

 

If you create a part, with multiple features and you rename the model parameter for those, then at a later date you end up deleting out that feature for a different one, those previously renamed model parameters are deleted. 

 

I only bring this up to future proof it, as the next logical step once getting into parameter naming is iLogic, Forms and assembly parameters that control sub-assembly or part parameters, then the names become really important and if equations are written between parts in iLogic, losing a parameter name if a part feature is deleted, will break those equations.

Tiffany_Hayden_
Collaborator

@chris Yes I have had that same experience before. I do understand your concept on future proofing. I tend to not delete features but suppress which doesn't cause the issue you are finding. Making library parts that have many features but some are suppressed and others are not have been my solution especially when making changes on a large scale. If changes were to be made at the part level I tend to use automation to recreate the parts and the assemblies driving the parts typically in my experience control iProperties and as long as the part works from the iProperty level then the part should work with the assemblies. Like I said this is just in my experience. 

chris
Advisor

@Tiffany_Hayden_ I'm looking forward to the rest of the series! 

Tiffany_Hayden_
Collaborator

@chris Thanks! I'm looking forward to writing them! Assembly is in progress now! 

Boorda
Advocate

Chris, Tiffany, those are both great points.
May sound redundant, but maybe create the User parameter for safety and rename the d-parameters for aesthetics.

I had created a nomenclature for custom parameter naming in the past that helped identify the parameter intentions which would look something like this:

  • ME_Parameter_Name  = Manually Entered Parameters.
  • FX_Parameter_Name   = Calculated parameters, not to be edited.

Maybe the old d-parameters could be renamed to MD_Parameter_Name that matches User parameter to signify it it the one used in the sketch or model?


Tiffany_Hayden_
Collaborator

I believe one of the major questions I've encountered previously revolves around the origin of the various part variations. Are they generated through automation or crafted manually? The distinction between the two carries significant implications. With automated generation, once the system is set up to produce all the necessary "library files," their existence is assured. However, if the process is manual, it introduces additional scrutiny requirements. That's a valid point, @Boorda !

KETIVMarketing
Explorer

Tiffany recently was on our webinar series, "KETIV Virtual Academy," where she covered this topic in video form! Check out the recorded session here: https://hubs.ly/Q02MNMMK0