All I want is to know what is in the BOM Quantity Drop down box. is it -none- is it QTY. I know it can be set using the CustomPropertyManager with swCustPropMgr.Set "UNIT_OF_MEASURE", " - none - " but how can i read whats in there.
take a look at BOM Quantity in Custom Property to Defualt
on a different note...often time you can find answers by searching the web...
the following search got me to the answer:
Since you already new about swCustPropMgr.Set "UNIT_OF_MEASURE"...
I simply assumed if there is a "set" call, there might be a "get" call as well. And turned out to be true.
Searching the web this way often times get's you close to what you are looking for.
I have looked online and I can find anything that allows for getting the name of the property. so for one part it might be Unit_of_Measure the next part might be WT the next part is RL and so on. so I can call for a Property name that i dont know what it is. I am looking for was way pull the name of the property. So in pseudo code what i want is
Get the name of the Custom property that is defined in the BOM Quantity
What i have come to fine out is the "UNIT_OF_MEASURE" is a general term used in the solidworks API to identify the Custum property used for the BOM Qty and is not the name of a custom property field itself. So the code used to find the name of the custom property field is
Dim swApp As SldWorks.SldWorks
Dim swModel As SldWorks.ModelDoc2
Set swApp = Application.SldWorks
Set swModel = swApp.ActiveDoc
Dim val As String
Dim resVal As String
swModel.Extension.CustomPropertyManager("").Get3 "UNIT_OF_MEASURE", False, val, resVal
MsgBox "BOM Quantity property is " & resVal