Do you want to strip the number on command or constantly? You could make an easy macro to strip that number.
Dim swApp As SldWorks.SldWorks
Dim swModel As ModelDoc2
Dim swModelDocExt As ModelDocExtension
Dim swCustProp As CustomPropertyManager
Dim PartNumber as String
Dim DetailNumber as String
Dim valout As String
Dim bool As Boolean
'Setting Active Programs and Documents
Set swApp = Application.SldWorks
Set swModel = swApp.ActiveDoc
Set swModelDocExt = swModel.Extension
'Setting Custom Properties
Set swCustProp = swModelDocExt.CustomPropertyManager("")
'Determine gets the part number
bool = swCustProp.Get4("PartNoDrawingNo", False, PartNumber, valout)
'Sets the Detail Number
DetailNumber = Right(PartNumber,2)
'Sets the detail Number as a Custom Property
swCustProp.Add3 "Detail Number", swCustomInfoType_e.swCustomInfoText, FileNumber, _
swCustProp.Set "Detail Number", DetailNumber
I would prefer not to do it with a macro. I would like to do it in the Template. This way it will update on save like the other custom properties in the Sheet Format.
I just edited my comment and made the macro code, I didn't test it but if you just throw a toggle button on your ribbon its pretty easy to operate.
Yes macros are easy to operate but I need this to work for everyone who uses this template. I will not be able to teach all current and future users to use a macro to extract the number. If the macro has to be activated manually it will likely be forgotten.
Add symbols is easier then exclude. Replace template for Part# with concatenate of two Properties: Property1 ####-.. + Property2 (10, or whatever 2 digits).
I'd use a design table then you can use Excel commands.
Thank You for all the quick feedback. The concatenate is a great idea. We just had a meeting with the group and decided to drop the Detail number field from our template all together so I no longer need a solution.
Thank You Again