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

SendStringToExecute in VB .Net

7 REPLIES 7
Reply
Message 1 of 8
Anonymous
780 Views, 7 Replies

SendStringToExecute in VB .Net

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
7 REPLIES 7
Message 2 of 8
Anonymous
in reply to: Anonymous

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
Message 3 of 8
Anonymous
in reply to: Anonymous

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
Message 4 of 8
Anonymous
in reply to: Anonymous

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
Message 5 of 8
dmarcotte4
in reply to: Anonymous

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!
Message 6 of 8
Anonymous
in reply to: Anonymous

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 🙂

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!
Message 7 of 8
Anonymous
in reply to: Anonymous

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
Message 8 of 8
Anonymous
in reply to: Anonymous

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

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