rhynson
Automotive
- Sep 3, 2010
- 1
I have been trying to figure out how to change a sketch color in an assembly with the Solidwokrs API and can't get it. There are two methods I have found to do this in Solidworks (we use 2009):
There is the line format toolbar, where I can access the line width, color, etc. But when I record using this to change the color, the recorded macro will not run, it causes an error. It is using SetLineColor that is in the PartDoc, but I can not get to this functionality, as I use a ModelDoc for an assembly.
There is also the Sketch/Curve Color tool, but recording this action show absolutely nothing in the code. All it has is the selection statement.
Does anyone know how to access either of these through the API?
There is the line format toolbar, where I can access the line width, color, etc. But when I record using this to change the color, the recorded macro will not run, it causes an error. It is using SetLineColor that is in the PartDoc, but I can not get to this functionality, as I use a ModelDoc for an assembly.
There is also the Sketch/Curve Color tool, but recording this action show absolutely nothing in the code. All it has is the selection statement.
Does anyone know how to access either of these through the API?