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: khadeerkruthi

Hi @khadeerkruthi.  The first (left) tab of the error message is generally not that useful, but the second tab (on the right, usually labeled "More Info") of the error message will sometimes contain something useful, which will help indicate where it is encountering the error.  If the error is happening at the line you specified, then there are still multiple possible reasons for that.  Either the variable "oDrawViewCurves" may already have a value set to it from the previous run, which would cause problems, or the "aoEdges" variable may not be set to a value, because it may have not found that named object.  Here is some example iLogic code that you may be able to use that might help some.

Replace this line of code:

oDrawViewCurves = oView.DrawingCurves(aoEdges)

...with this block of code:

If aoEdges Is Nothing Then Return False 'or Exit Function
Dim oDrawViewCurves As DrawingCurvesEnumerator = Nothing
Try 'try doing something that might fail
	oDrawViewCurves = oView.DrawingCurves(aoEdges)
Catch 'what to do when that fails
	Return False 'or Exit Function
	'Logger.Error("Error getting drawing view curves.")
End Try
If oDrawViewCurves Is Nothing OrElse oDrawViewCurves.Count = 0 Then
	Return False 'or Exit Function
End If

Since I do not know what the purpose of the Boolean type return value of the main Function is, you could use 'Exit Function' instead of 'Return False' in those 3 places, but both ways will likely have the same effect (exiting the Function at that point, and the returned Boolean will likely be False).

Wesley Crihfield

EESignature

(Not an Autodesk Employee)