Setting Defaults for Extrusion in New Part

Setting Defaults for Extrusion in New Part

JSEiler5VQ52
Explorer Explorer
861 Views
4 Replies
Message 1 of 5

Setting Defaults for Extrusion in New Part

JSEiler5VQ52
Explorer
Explorer

Hi all,

 

I would like to create a new part template that allows me to set some default values I want Inventor to use during the earliest stages of part creation.

 

As a specific example, when creating the first extrusion in a new part after my sketch is complete, instead of it defaulting to "1 in" it would be great to have the already highlighted text inside the extrusion prompt to be "Thickness".

 

"Thickness" is a User Parameter managed by iLogic scripts that are already existing. I guess I am just tired of typing in the word "Thickness" at the beginning of each new part.

 

A secondary objective for some bonus points would be to get Inventor to default to extrude "Symmetrically" splitting the plane. 

 

This is for brand new, solid-less parts on the originating sketch of the part only. I'm not trying to get crazy.

 

 

I'm not scared to have to write some iLogic script that handles the new part creation for me, I just don't have the time to get that in depth at the moment.

 

-S

 

 

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

Anonymous
Not applicable

This post may be of interest, particularly the iLogic part template

 

https://forums.autodesk.com/t5/inventor-forum/default-extrusion-setting/td-p/1775429

 

0 Likes
Message 3 of 5

chandra.shekar.g
Autodesk Support
Autodesk Support

Hi @JSEiler5VQ52,

 

Try the following iLogic rule to update Extrude distance after creating extrude in a part.

 

Dim oDoc as PartDocument
oDoc = ThisApplication.ActiveDocument

Dim oPartDef as PartComponentDefinition
oPartDef = oDoc.ComponentDefinition

Dim oFeature As PartFeature

For Each oFeature In oPartDef.Features
	If oFeature.Type = ObjectTypeEnum.kExtrudeFeatureObject Then
		
		Dim oExtrude As ExtrudeFeature
		oExtrude = oFeature
		
		For Each oPar As Parameter in oPartDef.Parameters
			If oPar.Name = "Thickness" Then
				oExtrude.Definition.SetDistanceExtent(oPar.Expression, PartFeatureExtentDirectionEnum.kSymmetricExtentDirection)
			End If
		Next		
	End If
Next

Please feel free to contact if there is any doubt.

 

If solves problem, click on "Accept as solution" / give a "Kudo".

 

Thanks and regards,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



0 Likes
Message 4 of 5

Anonymous
Not applicable

I too would like this option to work but rather than entering "Thickness" I just want it to extrude to .75 in each time instead of 1 in. but still spit symmetrically.

0 Likes
Message 5 of 5

chandra.shekar.g
Autodesk Support
Autodesk Support

Hi @Anonymous,

 

By default, thickness of extrude always "1 in" for Standard(in).ipt template.

 

Thanks and regards,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



0 Likes