02-16-2023
05:53 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
02-16-2023
05:53 PM
Hi @GosponZ
You can use Regex for this.
I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com
Imports System.Text.RegularExpressions
oDoc = ThisDoc.Document
oSheets = oDoc.Sheets
For Each oSheet In oSheets
oSheet.activate
oView = oSheet.DrawingViews.Item(1)
modelName = oView.ReferencedDocumentDescriptor.ReferencedDocument
oProp = modelName.PropertySets.Item("Design Tracking Properties")
sSpecicals = "[#$%&'()*+,-./\\~:;]"
oPN = Regex.Replace(oProp.Item("Part Number").Value, sSpecicals, "")
oDesc = Regex.Replace(oProp.Item("Description").Value , sSpecicals, "")
ActiveSheet.Sheet.Name = oPN & " " & oDesc
Next
oSheets(1).activate
iLogicVb.UpdateWhenDone = True