Hi.
I'm pretty new to API and have been trying to make a macro to modify a feature's colour. I'd like the macro to change any selected feature's colour.
I've been looking for examples but have only found something to change face colour.
Can someone point me in the right direction?
Thanks
Asaf
SolidworksApi macros
Take a look at this method: http://help.solidworks.com/2013/English/api/sldworksapi/solidworks.interop.sldworks~solidworks.interop.sldworks.imodeldoc2~selectedfeatureproperties.html
The example is also available by this link.
Thanks for the quick response!
As I said I'm new to API so just wondering, if I only want to change the feature color do I need to first get the current variables such as transparency etc and then plug those variables in as well or is there a quicker way?
Cheers.
Asaf
Please find the macro in the attachment. It changes the color of selected feature to green. You can change the color by changing these values (RGB - from 0 to 1) in main sub:
Perfect! thanks so much for your help.