Change all surface texture symbol style standard reference

Change all surface texture symbol style standard reference

Anonymous
Not applicable
710 Views
6 Replies
Message 1 of 7

Change all surface texture symbol style standard reference

Anonymous
Not applicable

Is it possible to change the Standard Reference for Surface Texture Style using iLogic for all texture symbols in drawing.

 

Regards
Steve

Image.jpg

0 Likes
Accepted solutions (2)
711 Views
6 Replies
Replies (6)
Message 2 of 7

JhoelForshav
Mentor
Mentor
Accepted solution

Hi @Anonymous 

Try this ilogic rule in your drawing to change all standard references to "BS 308 - 1990" as in your image 🙂

For Each oSheet As Sheet In ThisDrawing.Document.Sheets
For Each oSymbol As SurfaceTextureSymbol In oSheet.SurfaceTextureSymbols
	oSymbol.Style.StandardReference = DraftingStandardEnum.kLegacyBSI_DraftingStandard 'BS 308 - 1990
Next
Next
Message 3 of 7

Anonymous
Not applicable

Thanks Jhoel, that's exactly what I needed.

 

Regards

Steve

Message 4 of 7

Anonymous
Not applicable

HI Jhoel,

 

Can this be done for an individually selected surface symbol?

 

Regards

Steve

0 Likes
Message 5 of 7

Anonymous
Not applicable

Hi Jhoel,

 

Think I have done it by selecting symbol first, unless you know of another way of selecting symbols on the fly.

' Set a reference to the select set of the active document.
Dim oDoc As DrawingDocument
oDoc = ThisApplication.ActiveDocument

' Find all selected occurrences and add them to an ObjectCollection.
Dim oSymbol As SurfaceTextureSymbol
Dim oSSet As SelectSet = oDoc.SelectSet
'Loop through all symbols
For Each oSymbol In oSSet

oSymbol.Style.StandardReference = DraftingStandardEnum.kLegacyBSI_DraftingStandard 'BS 308 - 1990
oSymbol.MaximumRoughness = ("0.8")
Next

 

0 Likes
Message 6 of 7

JhoelForshav
Mentor
Mentor
Accepted solution

Hi @Anonymous 

You can run a rule like this and just dynamically click all the symbols you want to change. End the command by pressing escape-button.

Dim oSymbol As SurfaceTextureSymbol
While True
oSymbol  = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kDrawingSurfaceTextureSymbolFilter, "Pick surface texture symbols. End with Esc.")
If oSymbol Is Nothing Then Exit While
oSymbol.Style.StandardReference = DraftingStandardEnum.kLegacyBSI_DraftingStandard 
oSymbol.MaximumRoughness = ("0.8")
End While
Message 7 of 7

Anonymous
Not applicable

Thanks Jhoel, your way feels more slick.

 

Regards

Steve