iLogic to convert surface texture

iLogic to convert surface texture

inventor4578
Advocate Advocate
261 Views
1 Reply
Message 1 of 2

iLogic to convert surface texture

inventor4578
Advocate
Advocate

Hi !

 

I looking for iLogic code to replace annotations for rugosity (N8 N9 N10...) to Ra 0.8 Ra 0.3... ect

 

I have lot of this to replace and i looking to make this automatic.

 

Thanks !

 

inventor4578_0-1656336233715.png

 

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

Zach.Stauffer
Advocate
Advocate

This will do what you want for the currently open drawing. I'm assuming you're using the ANSI surface texture definition, if not you'll need to change that part and the parameter you want to change.

 

If you want to change other parts of the symbol, you can reference the API documentation.

Dim drawingDoc As Inventor.DrawingDocument = ThisApplication.ActiveDocument

For Each sht As Inventor.Sheet In drawingDoc.Sheets
	For Each textureSymbol As Inventor.SurfaceTextureSymbol In sht.SurfaceTextureSymbols
		Dim symbolDefinition As Inventor.SurfaceTextureANSIDefinition = textureSymbol.Definition
		symbolDefinition.SamplingLength = 100        'change this to whatever you want
	Next	
Next

 

0 Likes