ilogic rule to set default standard/style for part and assembly

ilogic rule to set default standard/style for part and assembly

Anonymous
Not applicable
255 Views
1 Reply
Message 1 of 2

ilogic rule to set default standard/style for part and assembly

Anonymous
Not applicable

In inventor drawing we would have different standards for part and assembly.

3CMetalEngineering_0-1629269753847.png

is there an ilogic rule to set default standard for part and assembly?

 

0 Likes
256 Views
1 Reply
Reply (1)
Message 2 of 2

Curtis_Waguespack
Consultant
Consultant

Hi @Anonymous 

 

Here is an example that sets the active drawing standard to a style based on the document type of the model referenced in the first view of the drawing.

 

I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com

 

Dim oDoc As Document = ThisDoc.Document
Dim oStylesMan As DrawingStylesManager = oDoc.StylesManager


oMDoc = ThisDrawing.ModelDocument

If oMDoc.DocumentType = DocumentTypeEnum.kAssemblyDocumentObject Then

	oStylesMan.ActiveStandardStyle = oStylesMan.StandardStyles("Assembly")

ElseIf oMDoc.DocumentType = DocumentTypeEnum.kPartDocumentObject Then

	oStylesMan.ActiveStandardStyle = oStylesMan.StandardStyles("Part")

End If
 

 

EESignature

0 Likes