.NET

Reply
Active Contributor
alankar
Posts: 41
Registered: ‎11-04-2004
Message 1 of 4 (65 Views)

Return list to AutoCAD !

65 Views, 3 Replies
12-04-2005 09:22 PM
Hi All,

I am using VB.Net and ObjectARX. Now I have written a function which gives the vertices of selected entity in a messagebox.. Now I want to have this list be stored in AutoCAD. How could I do this ?

I tried following but failed because there is a limitation of 256 characters, I think.

--------------------------------------------------------------------------------------
msgLst = "(Setq VerLst(list" & outPts & ")) "
Application.DocumentManager.MdiActiveDocument.SendStringToExecute(msgLst, True, False, True)
---------------------------------------------------------------------------------------

Is there any method with which I can return this list to AutoCAD ?

Regards,
Alankar
*Laurence Skoropinski
Message 2 of 4 (65 Views)

Re: Return list to AutoCAD !

12-05-2005 12:34 AM in reply to: alankar
The easy answer might be to build the lisp list using "(Setq VerLst (cons "
+ Pt + " VerList))" assuming Pt is a string then call SendString for each
point, you might want to sent a "(Setq VerLst (reverse VerLst))" at the end
to get back in order.

Or use the undocumented VL.Application.16 (do Google search for that one).

Or search new group subjects for Calling DLL from Lisp

Laurence

wrote in message news:5028917@discussion.autodesk.com...
Hi All,

I am using VB.Net and ObjectARX. Now I have written a function which gives
the vertices of selected entity in a messagebox.. Now I want to have this
list be stored in AutoCAD. How could I do this ?

I tried following but failed because there is a limitation of 256
characters, I think.

--------------------------------------------------------------------------------------
msgLst = "(Setq VerLst(list" & outPts & ")) "
Application.DocumentManager.MdiActiveDocument.SendStringToExecute(msgLst,
True, False, True)
---------------------------------------------------------------------------------------

Is there any method with which I can return this list to AutoCAD ?

Regards,
Alankar
Active Contributor
alankar
Posts: 41
Registered: ‎11-04-2004
Message 3 of 4 (65 Views)

Re: Return list to AutoCAD !

12-05-2005 02:36 AM in reply to: alankar
Thanks Laurence !

I used cons and my proble is solved now. But I think this is not a good manner to do this. Is there any direct method to do this ?

I searched VL.Application.16 on google but couldn't find something significant.

Can DLLs return something, while called in LISP ?

Regards,
Alankar
*Laurence Skoropinski
Message 4 of 4 (65 Views)

Re: Return list to AutoCAD !

12-05-2005 03:21 AM in reply to: alankar
I can only assume that you are setting a lisp variable because you want to
mix old lisp code with new .Net code.

The Calling DLL from Lisp is probably the best method to do this, as you can
call methods and set/get properties from the vlisp environment. I.E. you
can call a method to draw a polyline in .net and then return the entity
handle. I have not taken this ant further than trying the example posted by
Tony Tanzillo. but from what I can see it should be possible.

Laurence



If this is so than the best way would be to
wrote in message news:5028977@discussion.autodesk.com...
Thanks Laurence !

I used cons and my proble is solved now. But I think this is not a good
manner to do this. Is there any direct method to do this ?

I searched VL.Application.16 on google but couldn't find something
significant.

Can DLLs return something, while called in LISP ?

Regards,
Alankar

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
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 to get help installing your software.

Ask the Community