.NET

Reply
Active Member
SuperFly
Posts: 6
Registered: ‎08-12-2005
Message 1 of 3 (102 Views)

Why can't I make a d*mn line??

102 Views, 2 Replies
09-16-2005 07:24 AM
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?
*MP
Message 2 of 3 (102 Views)

Re: Why can't I make a d*mn line??

09-24-2005 02:29 AM in reply to: SuperFly
wrote in message news:4958660@discussion.autodesk.com...
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?


Set testline = oDoc.ModelSpace.AddLine(testp1, testp2)

hth
Mark
*MP
Message 3 of 3 (102 Views)

Re: Why can't I make a d*mn line??

09-24-2005 02:32 AM in reply to: SuperFly
"MP" wrote in message
news:4966229@discussion.autodesk.com...
wrote in message news:4958660@discussion.autodesk.com...
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?


Set testline = oDoc.ModelSpace.AddLine(testp1, testp2)

oops sorry, just realized this is the dotnet grp.
don't know if syntax is different from vb

hth
Mark
Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.