Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Using Replace with numeric wildcards

1 REPLY 1
SOLVED
Reply
Message 1 of 2
b.tuckerB6DT3
132 Views, 1 Reply

Using Replace with numeric wildcards

I am writing a function that will parse through all my sheets and replace the sheet name from:
Assembly:1

Details:2

 

to

Sheet 1 - Assembly:1

Sheet 2 - Details:2

 

I am having troubles using the replace command to ignore the ":1" at the end of the original title to be able to replace it. Can anyone give me some insight on how to use RegEx modifiers to select any number?

 

 

Dim oDoc As Document 
Dim dwgDoc As DrawingDocument = ThisDoc.Document
i = 1
For Each dwgSheet As Sheet In dwgDoc.Sheets
	vTest = dwgSheet.Name.Replace(":", "")
	vTest = vTest.Replace("#", "")
	If i = 1
		MsgBox(vTest)
	end if 
	'dwgSheet.Name = "Sheet " & i & " - " & vTest
	i = i + 1
Next

 

1 REPLY 1
Message 2 of 2

vTest = dwgSheet.Name.split(":")(0)

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators


Autodesk Design & Make Report