I am writing a Macro with use of several things I found on the internet. This is my first SW Macro with a form. I think the rest is coded correctly but I get an error upon form load.
Any help would be appreciated!
When you get that error, hit F8 until you reach the line on which the error occurs. It occurs on this line:
VendorNum1.Text = CheckVendorNum
The reason being that the form "CustProp" doesn't have a control called "VendorNum1".
SolidWorks API Training
Alfred, instead of codes can you rather upload the complete macro so that one can test and found out the issue for the error.
After clicking reply, click on use advanced editor (top right corner of reply box) and then you can see the option to attach in bottom right corner.
Thank you Deepak!
I thought something was wrong when I didn't see an attach option when first submitting to the forum. I had to add solidworks.com to compatibility view in IE.
Attached is the macro.
Awesome!....Thank you very much....I am glad it was simple....I went over those many times and can't believe I overlooked that.
I hope you have a wonderful day!!
I do have one more question for you.....On the properties form....we get the material and stocksize from the model....with code in the properties fields.....on the macro when it grabs the info for what is in these fields it shows the code not what it equates to.....
properties on the part for material = "SW-Material@@Default@Part1.SLDPRT"
This is what shows currently in the material textbox on the form....how do I get it to show the material that is set to the part or:
"SW-Material@@Default@Part1.SLDPRT" equates to "4141 PH"(....1020 ANSI, 4140 PH, etc.) on the material field on the form?
Thanks for your help again!!
Retrieving data ...