.NET

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

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

84 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 (84 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 (84 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

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Welcome to the new Autodesk Community!
If this is your first visit, click here to get started and make the most of the Community. Let us know what you think of the new experience in the Community Feedback Forum.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community