I am a Solidworks 2019 user, and our company does not have a PDM system. I would like to streamline the saving convention and make the BOM data extraction process quicker. I am not very familiar with APIs.
Requirement: An equation that can be run to detect and assign a combination of text within a part's title, to automatically compile MATERIAL and DESCRIPTION properties.
- After modelling, I would like to save a part as "M30405 Gusset". I would manually type all text, and save the file in the applicable folder.
- I would then like to run an equation that detects the first 6 characters in the title, and assign them to the 'PART NUMBER' property of the current file.
- If possible, the same equation should be able to detect all characters after the space, and assign them to the 'DESCRIPTION' property of the file.
What I have done so far:
"dummy"= part.Extension.CustomPropertyManager("").Set("partno", Left(part.GetTitle,6))
"dummy2"= part.Extension.CustomPropertyManager("").Set("description", Mid(part.GetTitle,8,50))
However, when pasting these lines into the File Properties -> Summary Information table, I am not getting any solution.
There are a few resources I investigated, but I can't make it function properly using SolidWorks 2019/2020:
Any help would be appreciated!!