VBA
Discuss AutoCAD ActiveX and VBA (Visual Basic for Applications) questions here.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Using VBA dialog box with AutoLISP

17 REPLIES 17
Reply
Message 1 of 18
Anonymous
499 Views, 17 Replies

Using VBA dialog box with AutoLISP

I have a question with VBA and AutoLISP. I want to use a VBA dialog box for
user input, then pass the data back to AutoLISP variables. Is there an easy
way to do that? Also, if anyone has suggetions on reference material on
this subject, I would be grateful to here about it.
--
Jim Matthews
=========================================
To reply to me, remove the "nospam-" in address header
=========================================
17 REPLIES 17
Message 2 of 18
Anonymous
in reply to: Anonymous

There's not a whole lot printed information on the subject, but I'd be glad
to help. As a matter of fact, I penned an article for Joe Sutphin's
"Sources" ezine on this very subject. If I remember correctly, it'll be
released on the 23rd. You can subscribe to the mag at
http://vbdesign.hypermart.net/sources.

Unforutnately, that means I can't share it with anyone for a bit but I can
give you general pointers. There's a few approaches to transferring data
between VBA and LISP. THe simplest is using the various USERxx variables but
that won't work for lists.

My personal favorite is work directly with AutoLISP symbols from VBA with
the VLAX class module (Downloads section of my site).

--
http://www.acadx.com
Win an autographed copy of
"Mastering AutoCAD 2000 Objects"
by Dietmar Rudolph

"Jim Matthews" wrote in message
news:7376F6DA675A5B76192170E20ACB3EA3@in.WebX.maYIadrTaRb...
> I have a question with VBA and AutoLISP. I want to use a VBA dialog box
for
> user input, then pass the data back to AutoLISP variables. Is there an
easy
> way to do that? Also, if anyone has suggetions on reference material on
> this subject, I would be grateful to here about it.
> --
> Jim Matthews
> =========================================
> To reply to me, remove the "nospam-" in address header
> =========================================
>
Message 3 of 18
Anonymous
in reply to: Anonymous

Nothing against VBA dialogs but I have found that the ObjectDCL dialogs from
www.objectdcl.com work great with autolisp and are well worth the price of
the program. It includes several advanced controls not available to dcl and
still integrates directly to autolisp through commands in an arx file. Plus
dialogs are designed in a Visual environment.

--
Rodney McManamy
President
MACSolids
Maximizing AutoCAD Solids
rmcmanamy@macsolids.com
"Jim Matthews" wrote in message
news:7376F6DA675A5B76192170E20ACB3EA3@in.WebX.maYIadrTaRb...
> I have a question with VBA and AutoLISP. I want to use a VBA dialog box
for
> user input, then pass the data back to AutoLISP variables. Is there an
easy
> way to do that? Also, if anyone has suggetions on reference material on
> this subject, I would be grateful to here about it.
> --
> Jim Matthews
> =========================================
> To reply to me, remove the "nospam-" in address header
> =========================================
>
Message 4 of 18
Anonymous
in reply to: Anonymous

Jim Matthews wrote:

> Also, if anyone has suggetions on reference material on
> this subject, I would be grateful to here about it.

If you have VB6 there are two briefs on this in the programming section
of http://www.dotsoft.com.

Good Luck, Terry
Message 5 of 18
Anonymous
in reply to: Anonymous

Not that ObjectDCL isn't a great idea but why pay for
something you already have? Not tomention that VBA is far
more expandable and doesn't suffer from little pecadillos
like having to repopulate lists when showing the form after
a hide.

--
http://www.acadx.com
Win an autographed copy of
"Mastering AutoCAD 2000 Objects"
by Dietmar Rudolph

"Rodney McManamy" wrote in
message
news:99875AC7A4B4E2E77885AD1931A538E1@in.WebX.maYIadrTaRb...
> Nothing against VBA dialogs but I have found that the
ObjectDCL dialogs from
> www.objectdcl.com work great with autolisp and are well
worth the price of
> the program. It includes several advanced controls not
available to dcl and
> still integrates directly to autolisp through commands in
an arx file. Plus
> dialogs are designed in a Visual environment.
Message 6 of 18
Anonymous
in reply to: Anonymous

Frank Oquendo wrote:

> ... Joe Sutphin's "Sources" ezine ...

I signed up for a year of that, don't think I *remembered* to visit the
site after the initial time. If it were something that arrived by email
in a PDF or something, it might be worth $30 per year.

Terry
Message 7 of 18
Anonymous
in reply to: Anonymous

Rodney McManamy wrote:

> ... dialogs from www.objectdcl.com work great ...

But what about when the ARX spec changes, and the objectdcl people
decide they didn't make enough money and don't create another build.
Not a good position to be in.

Terry
Message 8 of 18
Anonymous
in reply to: Anonymous

I agree with both Frank and Terry. I am a programmer that is not savey
enought to use VB or C++ and would be the type of person who would want
ObjectDCL....but I am concerned over compatibity with future versions. I
use only one 3rd party software (DosLib) in a limited capacity. I don't
want to get myself into a corner just in case Dale descides to haul a$$.
(kidding Dale). The thing that cautions me is that if I start programming
with ObjectDCl and all my dialogs are from this program...what happens if or
when they stop supporting this. They may never go out of business but I
would be betting alot that they would not.

With the way VBA is going and all the software out there to help get lisp to
VBA I would go with the way that requires not additional software.

As for the controls that VBA doesn't have...I could be wrong but can't you
pay just about the same price for ObjDcl and have a custom control
made....No?

just my 2 cents.

--
Rob Starz
rob@stardsign.com
Plogv 3.0 & 2000 (plot logging) for r14 & 2000
***Enhancement Tools for Arch. Desktop FREE!!!!*****
http://www.stardsign.com/main.htm
StarDsign cad solution
Message 9 of 18
Anonymous
in reply to: Anonymous

Frank,

I have a question regarding VLAX...since this post was started I thought I
might just ask it here.

I have routine that start a VBA module and in the module I start a dialog.
In the Userform.initialize I have code to try to grab a list and populate a
listbox. If I do VBARUN and select the module to start the list is
populated with no problem....now I run the LISP command and do a vl-vbarun
and i get an error when i get to the portion what VLAX is called to get the
list.

Is there a limitation to VLAX when called from lisp?

--
Rob Starz
rob@stardsign.com
Plogv 3.0 & 2000 (plot logging) for r14 & 2000
***Enhancement Tools for Arch. Desktop FREE!!!!*****
http://www.stardsign.com/main.htm
StarDsign cad solution
Message 10 of 18
Anonymous
in reply to: Anonymous

If the following doesn't solve your problem, either post or email your code.

Add (VL-LOAD-COM) to the top of the lisp routine doing the calling.

--
http://www.acadx.com
Win an autographed copy of
"Mastering AutoCAD 2000 Objects"
by Dietmar Rudolph

"Rob Starz" wrote in message
news:CE79A46868A28B7EFD0A55393CEE5FAB@in.WebX.maYIadrTaRb...
> Frank,
>
> I have a question regarding VLAX...since this post was started I thought I
> might just ask it here.
>
> I have routine that start a VBA module and in the module I start a dialog.
> In the Userform.initialize I have code to try to grab a list and populate
a
> listbox. If I do VBARUN and select the module to start the list is
> populated with no problem....now I run the LISP command and do a vl-vbarun
> and i get an error when i get to the portion what VLAX is called to get
the
> list.
>
> Is there a limitation to VLAX when called from lisp?
Message 11 of 18
Anonymous
in reply to: Anonymous

As is my habit whenever I see Sources discussed, I forwarded
your post to Joe. In response, he is in the process of
setting up a mailing list to alert subscribers to new
issues. Keep an eye on your inbox.

--
http://www.acadx.com
Win an autographed copy of
"Mastering AutoCAD 2000 Objects"
by Dietmar Rudolph

"Terry W. Dotson" wrote in message
news:3AE2069D.A4FFF024@dotsoft.com...
> Frank Oquendo wrote:
>
> > ... Joe Sutphin's "Sources" ezine ...
>
> I signed up for a year of that, don't think I *remembered*
to visit the
> site after the initial time. If it were something that
arrived by email
> in a PDF or something, it might be worth $30 per year.
>
> Terry
Message 12 of 18
Anonymous
in reply to: Anonymous

Terry,

Just had to chime in here a bit,

I could say these same things about ToolPac or VLAX. You guys may fall off
the face of the earth at anytime (theoretically). Terry, I don't think you
would have appreciated someone discouraging the use of ToolPac just because
you were new to the arena. What happens if I become dependant on your
software and you go belly-up?

I am just trying to make the point that discouraging the use of the software
will make it harder for ObjectDCL to stick around. This does not help those
of us that use and like the program very much.

What about dockable forms, modeless forms, configuration tabs.....
Can VLAX or your method do all of these? (without using other arx)

"Terry W. Dotson" wrote in message
news:3AE20853.522F5112@dotsoft.com...
> Rodney McManamy wrote:
>
> > ... dialogs from www.objectdcl.com work great ...
>
> But what about when the ARX spec changes, and the objectdcl people
> decide they didn't make enough money and don't create another build.
> Not a good position to be in.
>
> Terry
Message 13 of 18
Anonymous
in reply to: Anonymous

> You guys may fall off the face of the
> earth at anytime (theoretically).

Two words: open source. VLAX, ACCONT.ARX and the like cannot be
compared to commercial products since the availability of the source
means you always have options even if the original authors are no
longer supporting the effort.

Not to mention there's a big difference between utilities and
technology necessary to the proper operation of your code. No one's
code is going to stop working if Terry drops ToolPac.

--
http://www.acadx.com
Message 14 of 18
Anonymous
in reply to: Anonymous

I completely understand your argument, and I believe it is a valid one for
those particular kinds or products. However, you still did not answer my
question about modeless forms and config tabs. I would like to hear your
response to these and the other issues I mentioned.

For ToolPac I was really talking more about dependencies on things like his
AutoCell, TableTools, and LiveText. It would still cause major problems for
companies who have become dependant on his products if he goes belly-up. I
was responding more to him saying:


But what about when the ARX spec changes, and the objectdcl people
decide they didn't make enough money and don't create another build.
Not a good position to be in.


I think the exact same thing could be said about ToolPac.
Some of his utilities do have APIs, and if you use them and he goes belly
up, then yes, some code may have problems.

Trying not to sound like I have an attitude.... 🙂
--
Joel Roderick

"Frank Oquendo" wrote in message
news:F6E37EAF68CBAEABBF0987364D2B0B0C@in.WebX.maYIadrTaRb...
> > You guys may fall off the face of the
> > earth at anytime (theoretically).
>
> Two words: open source. VLAX, ACCONT.ARX and the like cannot be
> compared to commercial products since the availability of the source
> means you always have options even if the original authors are no
> longer supporting the effort.
>
> Not to mention there's a big difference between utilities and
> technology necessary to the proper operation of your code. No one's
> code is going to stop working if Terry drops ToolPac.
>
> --
> http://www.acadx.com
>
Message 15 of 18
cwanless
in reply to: Anonymous

Hi since you fellows are discussing my program, ObjectDCL, I thought I might as well get in on the conversation. I have no plans on dumping ObjectDCL. It took a long time to write it, working on a part time basis after hours and week ends. Time I could have spent with my family. Now that it's for sale I am developing it on a full time basis. And have many ideas that I wish to add, both mine and wonderfull suggestions ObjectDCL users. Many of whom, have phoned me personally to thank me for creating the product and making such a useful set of tools and controls, that simple in some cases VBA can't duplicate without effort, or at all (both in R14 and R2000 and the next release once it's available). Now to answer the question, in the case that it doesn't make enough money, I will simply go back to developing it on a part time basis, as I did when I first created it. But I will tell you the install base is around 800 people now and I don't see an end of demand for ObjectDCL. Thanks Chad
Message 16 of 18
cwanless
in reply to: Anonymous

VBA is not free! Sure it comes included with AutoCAD, but your time is not free. We don't work in a world where we program for free. If an AutoLisp programmer wants to create a dialog box in VBA he/she could spend up to a week just getting used to the programming language and how to make it work with AutoLisp. With ObjectDCL the same dialog box could be created in hours because there in no new language to learn and get used to. Trust me I have gone from AutoLisp to VB and then to C++ and each time there was a huge learning curved that slowed me down and cost me lots of time. ObjectDCL pays for itself in the first day compared to using VBA.
Message 17 of 18
Anonymous
in reply to: Anonymous

> ObjectDCL pays for itself in the first
> day compared to using VBA.

That all depends on the standard by which you measure cost and
benefit. For example, the week spent learning VBA forms (a little
exaggerated IMO, but why not) translates to a working knowledge of VBA
forms and a working knowledge of event-driven programming in *all*
VBA-enabled applications. The same cannot be said of ObjectDCL's
proprietary format.

Don't get me wrong: ObjectDCL is cool (especially compared to the
fossil that is DCL). I guess it comes down to a simple choice: do you
want to expand your toolbox or your skills?

--
http://www.acadx.com
Message 18 of 18
Anonymous
in reply to: Anonymous

> However, you still did not answer my question
> about modeless forms and config tabs.

What's to answer? Those are standard issue in VBA. In
addition, I can use any control I have a design-time license
for, not the just the ones the author feels are useful.

--
http://www.acadx.com

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

Post to forums  

Autodesk Design & Make Report

”Boost