Ilogic to change Document Settings

Ilogic to change Document Settings

erichter
Advocate Advocate
734 Views
2 Replies
Message 1 of 3

Ilogic to change Document Settings

erichter
Advocate
Advocate

Is it possible to use iLogic to change the Document Settings of a part or assembly? I want to be able to change the Visual Style within Display Appearance. I am aware that I can change this globally, but I would like to do it it within the Document Settings for each part or assembly.

 

 Document Settings.PNG

 

Display Appearance.PNG

0 Likes
Accepted solutions (2)
735 Views
2 Replies
Replies (2)
Message 2 of 3

WCrihfield
Mentor
Mentor
Accepted solution

Hi @erichter.  Yes.  It is possible.  Under the PartDocument (Link1, Link2) object is a property called DisplaySettings (Link3, Link4), which returns a DisplaySettings object (Link5, Link6).  That object should have most of what you are looking for.  Below is a small starter sample to get you started.

 

If ThisDoc.Document.DocumentType <> DocumentTypeEnum.kPartDocumentObject Then
	MsgBox("A Part Document must be active for this rule to work. Exiting.", vbCritical, "")
	Exit Sub
End If
Dim oPDoc As PartDocument = ThisDoc.Document
Dim oDispSettings As DisplaySettings = oPDoc.DisplaySettings
'oDispSettings.AreTexturesOn = True

PS.  A few of the other areas shown within the Document Settings dialog can be accessed through these properties of the PartDocument object:

oPDoc.ModelingSettings
oPDoc.Sketch3DSettings
oPDoc.SketchSettings
oPDoc.ComponentDefinition.BOMQuantity
oPDoc.ComponentDefinition.BOMStructure

 

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes
Message 3 of 3

erichter
Advocate
Advocate
Accepted solution

I found it. It's NewWindowDisplayMode. Thanks!

 

oDispSettings.NewWindowDisplayMode = kShadedWithEdgesRendering

 

0 Likes