Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
WCrihfield
in reply to: Leonardo_Czuy

Hi @Leonardo_Czuy.  Most of that code looks OK, but this is obviously not the entire code, so there are some things we can not know about this.  This Sub routine only has one input parameter, yet it is using several variables within it (such as MainLayer, drawCurves, & HiddenLayer) that are neither passed into it, nor created within it, so we don't know if those other variables have been declared, if they have been assigned values, or what Type of object they represent.  There is an odd couple of lines were you create a variable (oColor) for a Color object, do not set a value to it, then set that oColor variable as the value of 'drawCurve.Color.  I am not sure what you were trying to do there, but it does not look correct right now.  I assume that the 'drawCurves' variable represents a DrawingCurvesEnumberator, and that the 'MainLayer' & 'HiddenLayer' variables represent Layer objects, but if those variables are not declared at a 'higher level' within the overall code, then I do not know if this Sub routine will recognize them, or be able to use that as you intended.  Also, if those Layers are Layers exist within the drawing being currently processed or not.  If not, you may need to either copy those layers from a library to the drawing document, or create those layers within the drawing document directly, before you can use them.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)