.NET

Reply
*Dale Levesque
Message 1 of 8 (341 Views)

SendStringToExecute in VB .Net

341 Views, 7 Replies
11-16-2005 09:58 AM
Is there something that I can use in VB .Net to accomplish the same as
SendStringToExecute in ObjectARX. All I really want to do is set a lisp
variable from a .net class library.

Dale
*Tony Tanzillo
Message 2 of 8 (341 Views)

Re: SendStringToExecute in VB .Net

11-16-2005 07:54 PM in reply to: *Dale Levesque
SendStringToExecute() is a member of the Document class.

However, the question that begs an answer is why
do you want to set LISP variables from .NET apps?

Wouldn't it be better to expose the variable in the
NET app via COM, so that when whatever LISP code
uses it, you can be sure that it will always get the
current value?

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006
http://www.acadxtabs.com

"Dale Levesque" wrote in message news:5015164@discussion.autodesk.com...
Is there something that I can use in VB .Net to accomplish the same as
SendStringToExecute in ObjectARX. All I really want to do is set a lisp
variable from a .net class library.

Dale
*Dale Levesque
Message 3 of 8 (341 Views)

Re: SendStringToExecute in VB .Net

11-23-2005 09:36 AM in reply to: *Dale Levesque
Thanks Tony, that would indeed be the best solution. I'm very new to this
stuff so I'll take a look at doing that and see if I can get it to work.

Dale

"Tony Tanzillo" wrote in message
news:5015767@discussion.autodesk.com...
SendStringToExecute() is a member of the Document class.

However, the question that begs an answer is why
do you want to set LISP variables from .NET apps?

Wouldn't it be better to expose the variable in the
NET app via COM, so that when whatever LISP code
uses it, you can be sure that it will always get the
current value?

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006
http://www.acadxtabs.com

"Dale Levesque" wrote in message
news:5015164@discussion.autodesk.com...
Is there something that I can use in VB .Net to accomplish the same as
SendStringToExecute in ObjectARX. All I really want to do is set a lisp
variable from a .net class library.

Dale
*Dale Levesque
Message 4 of 8 (341 Views)

Re: SendStringToExecute in VB .Net

11-23-2005 09:43 AM in reply to: *Dale Levesque
The variable is a counter to determine how many vertical dimensions have
been drawn so that it knows how far offset the current dimension should be
drawn. I can pass it to the .Net app but I want the .Net app to increment it
as it creates dimensions. That way Lisp will know the proper value after it
has been changed by the .Net app. Is it possible to pass a var created by
the lisp routine back after it has been modified in the .Net app?

Dale

"Tony Tanzillo" wrote in message
news:5015767@discussion.autodesk.com...
SendStringToExecute() is a member of the Document class.

However, the question that begs an answer is why
do you want to set LISP variables from .NET apps?

Wouldn't it be better to expose the variable in the
NET app via COM, so that when whatever LISP code
uses it, you can be sure that it will always get the
current value?

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006
http://www.acadxtabs.com

"Dale Levesque" wrote in message
news:5015164@discussion.autodesk.com...
Is there something that I can use in VB .Net to accomplish the same as
SendStringToExecute in ObjectARX. All I really want to do is set a lisp
variable from a .net class library.

Dale
Distinguished Contributor
dmarcotte4
Posts: 195
Registered: ‎04-02-2005
Message 5 of 8 (341 Views)

Re: SendStringToExecute in VB .Net

11-23-2005 04:33 PM in reply to: *Dale Levesque
Dale,

You can set and read Autolisp symbols (*global*) through COM by accessing VLLib.dll. see http://www.acadx.com/ and look for vlax.net. It’s help me so far in migrating my lisp apps to .NET. Don’t forget you can use USERI , USERR system variables to pass data between .NET and Autolisp.

Have fun!
*Dale Levesque
Message 6 of 8 (341 Views)

Re: SendStringToExecute in VB .Net

11-24-2005 07:46 AM in reply to: *Dale Levesque
Thanks Daniel, I'll take a look at that. I try to stay away from the USERI
etc vars if i can help it. Not sure why :smileyhappy:

wrote in message news:5021900@discussion.autodesk.com...
Dale,

You can set and read Autolisp symbols (*global*) through COM by accessing
VLLib.dll. see http://www.acadx.com/ and look for vlax.net. It's help me so
far in migrating my lisp apps to .NET. Don't forget you can use USERI ,
USERR system variables to pass data between .NET and Autolisp.

Have fun!
*Tony Tanzillo
Message 7 of 8 (341 Views)

Re: SendStringToExecute in VB .Net

11-24-2005 11:01 AM in reply to: *Dale Levesque
You shouldn't be passing variables around, because
that requires them to be updated when they change
(e.g., passed to the other environment again).

Doing that makes no sense, and it is a basic design
flaw. In other words, you don't have to pass variables
to LISP, you should instead expose the .NET variable
as a Property of an ActiveX object that can be read
from LISP.

Whenever your LISP code needs to use the variable,
it just reads it from the ActiveX object's property,
which means that there only needs to be one copy
of the underlying data, rather than two that must
be kept synchronized.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006
http://www.acadxtabs.com

"Dale Levesque" wrote in message news:5021497@discussion.autodesk.com...
The variable is a counter to determine how many vertical dimensions have
been drawn so that it knows how far offset the current dimension should be
drawn. I can pass it to the .Net app but I want the .Net app to increment it
as it creates dimensions. That way Lisp will know the proper value after it
has been changed by the .Net app. Is it possible to pass a var created by
the lisp routine back after it has been modified in the .Net app?

Dale

"Tony Tanzillo" wrote in message
news:5015767@discussion.autodesk.com...
SendStringToExecute() is a member of the Document class.

However, the question that begs an answer is why
do you want to set LISP variables from .NET apps?

Wouldn't it be better to expose the variable in the
NET app via COM, so that when whatever LISP code
uses it, you can be sure that it will always get the
current value?

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006
http://www.acadxtabs.com

"Dale Levesque" wrote in message
news:5015164@discussion.autodesk.com...
Is there something that I can use in VB .Net to accomplish the same as
SendStringToExecute in ObjectARX. All I really want to do is set a lisp
variable from a .net class library.

Dale
*Dale Levesque
Message 8 of 8 (341 Views)

Re: SendStringToExecute in VB .Net

11-25-2005 07:44 AM in reply to: *Dale Levesque
Thats exactly what I did in the end Tony. It works great. I modified the
code for exposing properties from your post in the 'Passing arguments and
returning values with .NET and LISP' thread.

Dale

"Tony Tanzillo" wrote in message
news:5022298@discussion.autodesk.com...
You shouldn't be passing variables around, because
that requires them to be updated when they change
(e.g., passed to the other environment again).

Doing that makes no sense, and it is a basic design
flaw. In other words, you don't have to pass variables
to LISP, you should instead expose the .NET variable
as a Property of an ActiveX object that can be read
from LISP.

Whenever your LISP code needs to use the variable,
it just reads it from the ActiveX object's property,
which means that there only needs to be one copy
of the underlying data, rather than two that must
be kept synchronized.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006
http://www.acadxtabs.com

"Dale Levesque" wrote in message
news:5021497@discussion.autodesk.com...
The variable is a counter to determine how many vertical dimensions have
been drawn so that it knows how far offset the current dimension should be
drawn. I can pass it to the .Net app but I want the .Net app to increment it
as it creates dimensions. That way Lisp will know the proper value after it
has been changed by the .Net app. Is it possible to pass a var created by
the lisp routine back after it has been modified in the .Net app?

Dale

"Tony Tanzillo" wrote in message
news:5015767@discussion.autodesk.com...
SendStringToExecute() is a member of the Document class.

However, the question that begs an answer is why
do you want to set LISP variables from .NET apps?

Wouldn't it be better to expose the variable in the
NET app via COM, so that when whatever LISP code
uses it, you can be sure that it will always get the
current value?

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006
http://www.acadxtabs.com

"Dale Levesque" wrote in message
news:5015164@discussion.autodesk.com...
Is there something that I can use in VB .Net to accomplish the same as
SendStringToExecute in ObjectARX. All I really want to do is set a lisp
variable from a .net class library.

Dale
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.