.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Return list to AutoCAD !

3 REPLIES 3
Reply
Message 1 of 4
alankar
214 Views, 3 Replies

Return list to AutoCAD !

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
3 REPLIES 3
Message 2 of 4
Anonymous
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
Message 3 of 4
alankar
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
Message 4 of 4
Anonymous
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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost