AnsweredAssumed Answered

How can I dynamically assign variables in SolidWorks VBA?

Question asked by Tim Lewis on Sep 1, 2015
Latest reply on Sep 1, 2015 by Tim Lewis

I am trying to create a macro to perform several tasks with custom properties assigned to parts (e.g. download image from a URL, create a local shortcut to a different URL, etc.).  I understand how to access these properties in VBA (as a result of having a previous question answered), but now I would to assign those values to VBA variables matching the name of the corresponding custom property.


Even if dynamic assignment isn't possible, what is the best way of doing this?  Is there a "dictionary" data structure?  I'd prefer to avoid just throwing them all in an array and having to remember which index corresponds to which property (and trust that they don't get rearranged at some point down the road).