Change general styles in drawings

Change general styles in drawings

ThomasCassan
Enthusiast Enthusiast
310 Views
1 Reply
Message 1 of 2

Change general styles in drawings

ThomasCassan
Enthusiast
Enthusiast

Hi Fans and Friends

 

I have just a question about chaning the general styles.

I am using a template and there are some adjustment saved in the styles.

so during a ilogic routine i want to update other drawings by my choice

current i am using this rule:

' Updaten der Stile
 Dim oIDW As DrawingDocument
    oIDW = ThisApplication.ActiveDocument
   
    Dim oIDWStyles As Inventor.DrawingStylesManager
    oIDWStyles = oIDW.StylesManager
   
    Dim i As Integer
   
'JW Loop durch unterstile entfernt da durch Loop unten die Aktualisierung aller Stile abgedeckt ist
   
    For i = 1 To oIDWStyles.Styles.Count
        'Debug.Print "Styles - " + oIDWStyles.Styles.Item(i).Name
        If oIDWStyles.Styles.Item(i).UpToDate = False Then
            oIDWStyles.Styles.Item(i).UpdateFromGlobal
        End If
    Next
   
    oIDW.Update
    oIDW.Save

Next
End If

but it doesnt work proper because there are still some styles in the origin mode.

whats wrong with this rule??

 

thx for your support!!

 

Thomas

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

bradeneuropeArthur
Mentor
Mentor

Hi.

Maybe for i=0 to.........

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

0 Likes