iLogic Drawing sheet color

iLogic Drawing sheet color

Raf_
Enthusiast Enthusiast
1,400 Views
2 Replies
Message 1 of 3

iLogic Drawing sheet color

Raf_
Enthusiast
Enthusiast

Hi All,

 

Is it possible to change drawing sheet color using iLogic external rule, also to add tick to Preserve Orphaned  Annotations and change dimensions text alignment as per screenshots below:

1.jpg2.jpg

 

Thanks

0 Likes
Accepted solutions (1)
1,401 Views
2 Replies
Replies (2)
Message 2 of 3

bradeneuropeArthur
Mentor
Mentor
Accepted solution

Hi,

 

For VBA:

Public Sub main()

Dim a As Application
Set a = ThisApplication

Dim b As DrawingDocument
Set b = a.ActiveDocument

Dim c As DrawingOptions
Set c = a.DrawingOptions

Dim oColor As Color
Set oColor = a.TransientObjects.CreateColor(255, 255, 255)

b.SheetSettings.SheetColor = oColor
b.DrawingSettings.PreserveOrphanedAnnotations = True
b.DrawingSettings.DimensionTextAlignment = kMaintainCenteredTextAlignment
End Sub

For I-logic:

Public Sub main()

Dim a As Application
a = ThisApplication

Dim b As DrawingDocument
b = a.ActiveDocument

Dim c As DrawingOptions
c = a.DrawingOptions

Dim oColor As Color
oColor = a.TransientObjects.CreateColor(255, 255, 255)

b.SheetSettings.SheetColor = oColor
b.DrawingSettings.PreserveOrphanedAnnotations = True
b.DrawingSettings.DimensionTextAlignment = kMaintainCenteredTextAlignment
End Sub

Regards,

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

Message 3 of 3

Raf_
Enthusiast
Enthusiast

Thank you very much works perfectly, just remove 'Set' from ilogic code 🙂

 

Set b = a.ActiveDocument