4 Replies Latest reply on Oct 13, 2014 4:25 PM by Bill Florac

    What is the best way to assign different values to numerous custom properties?

    Andrew Hsu

      Hi, all. Let me give you a quick rundown of my issue:

       

      For every part we make at my company, we run it through a macro. This macro prompts a form that includes properties like "Machine", "Material", "Finish", etc. After each field is manually filled out and the "done" button is pressed, the values are then assigned to the part or assembly.

       

      With SW2014, the macro no longer runs. The problem has arisen because we are upgrading from SW2010 to SW2014. Unfortunately, the macro uses ActiveX controls (Common controls) that are not compatible with VBA7. I have contacted SW support as well as other resources, and it seems as if the only option is to debug and fix the new macro. Unfortunately, no one at my company knows VBA or has much experience with SolidWorks API. *Note: I have done the PtrSafe adjustment, but it does not solve my problems with the common controls.

       

      As such, I was wondering if: A) There is some sort of built-in function or existing community macro that will do what we are trying to do (Custom property value assignment using a form) or B) if anyone can give me a head-start on debugging/fixing the macro. First of all, I have no idea what functions belonged to the VBA6 Common Controls, so a list of said functions would be extremely helpful. Additionally, any code substitution of said functions will save me a ton of researching and VBA experimentation.

       

      Please let me know if you can help or if I can provide you with any more information.

       

      Thanks for your help,

       

      Andrew H