Message 1 of 3
Why can't I make a d*mn line??
Not applicable
09-16-2005
07:24 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm transferring my VBA code to an independent .Net application. I'm working fine with selection sets, layers, even offsets and copy commands - but for some reason, I get an execution error when I try the AddLine method - can someone tell me what's wrong?
Dim testline As AcadLine
Dim testp1(2) As Double
Dim testp2(2) As Double
testp1(0) = 0 : testp1(1) = 0 : testp1(2) = 0
testp2(0) = 5 : testp2(1) = 5 : testp2(2) = 0
Dim oApp As AcadApplication
Dim oDoc As AcadDocument
oApp = GetActiveObject("AutoCAD.Application")
oDoc = oApp.ActiveDocument
testline = oDoc.ModelSpace.AddLine(testp1, testp2)
That's where I get the "System.ExecutionEngineException" error. Help?
Dim testline As AcadLine
Dim testp1(2) As Double
Dim testp2(2) As Double
testp1(0) = 0 : testp1(1) = 0 : testp1(2) = 0
testp2(0) = 5 : testp2(1) = 5 : testp2(2) = 0
Dim oApp As AcadApplication
Dim oDoc As AcadDocument
oApp = GetActiveObject("AutoCAD.Application")
oDoc = oApp.ActiveDocument
testline = oDoc.ModelSpace.AddLine(testp1, testp2)
That's where I get the "System.ExecutionEngineException" error. Help?