Author Topic: Exposing Objects in VLISP  (Read 6122 times)

0 Members and 1 Guest are viewing this topic.

ML

  • Guest
Re: Exposing Objects in VLISP
« Reply #15 on: March 19, 2008, 05:30:55 PM »
Hummmm
Sounds interesting!

Do you think you could give me a small sample?

I would love to try it

Thanks!

Mark

ML

  • Guest
Re: Exposing Objects in VLISP
« Reply #16 on: March 19, 2008, 05:39:05 PM »

Sounds cool Jeff!

Yes, I did do what you told me, I think?

I was able to successfully dump The ACAD Objects in VLISP
However, I was hoping it would be as easy as getting The ACAD app objects.

The other thing Jeff is that I am not yet familiar enough with LDD, but I am sure I will have some question for you in the future.

I was hoping to connect to and see different collections in VLISP as we do in ACAD.

Again, it looks like we can, it just doesn't seem as intuitive.

Now Jeff, you know that you can get to all of the Land Desktop Objects, Props and Methods in VBA, don't you?

I just set a reference to The AutoDesk Land 4.0 Type Library and voila.
The cool thing is that there is also code examples.

So, on the flip side, I was hoping to be able to see that same info in VLISP the way I can in VB.

I have to keep in mind that they are 2 different apps.

I can not expect to hit an operator (.) and get all of the associated properties as I would in VBA.

I'm sure I am missing something

Thanks!
Mark

ML

  • Guest
Re: Exposing Objects in VLISP
« Reply #17 on: March 19, 2008, 05:42:12 PM »

Hell

In VBA, I can put this bit of code in:

Code: [Select]
Public AcadApp As AcadApplication
Sub AcadAppObjs()
 
'Use this module to step through the acad app objects with the locals window open
 
'This intializes the public variable ACADApp which is used to intercept The Acad Application Objects
 Set AcadApp = ThisDrawing.Application
 
 End Sub

With Locals open, hit F8 and viola, every thing I need for the acad object.

Mark

kdub_nz

  • Mesozoic keyThumper
  • SuperMod
  • Water Moccasin
  • Posts: 2140
  • class keyThumper<T>:ILazy<T>
Re: Exposing Objects in VLISP
« Reply #18 on: March 19, 2008, 05:44:14 PM »

yep, with Vlisp a little knowledge is required.  :wink:
Called Kerry in my other life
Retired; but they dragged me back in !

I live at UTC + 13.00

---
some people complain about loading the dishwasher.
Sometimes the question is more important than the answer.

Jeff_M

  • King Gator
  • Posts: 4096
  • C3D user & customizer
Re: Exposing Objects in VLISP
« Reply #19 on: March 19, 2008, 06:05:54 PM »
Nope, you about got it right. There is no Easy Button when it comes to VLisp and the Acad Verticals. There is a lot of trial & error and using the help & VBAIDE (yes, the Object Browser there helps to figure out what is expected of the arguments). Here's a 'for instance' for you getting the Preferences you spoke of (assuming you have the AeccApp as shown previously):
Code: [Select]
(setq prefs (vlax-get aeccapp 'preferences))
(setq fileprefs (vlax-get prefs 'files))
Also, as James noted, (vlax-dump-object) can, and will be, your friend. Use it on every Object you want to know about, it will help you dive deeper into the abyss.

BTW, since you know what you can do with VBA, why the trip into lisp land?

Jeff_M

  • King Gator
  • Posts: 4096
  • C3D user & customizer
Re: Exposing Objects in VLISP
« Reply #20 on: March 19, 2008, 06:15:04 PM »
With Locals open, hit F8 and viola, every thing I need for the acad object.
In the VLIDE you can rightclick on any set varaible and select  Inspect, this will give you a window which shows all of the properties of that object. See the pic where I show the Acadobject & the AeccApp.

Jeff_M

  • King Gator
  • Posts: 4096
  • C3D user & customizer
Re: Exposing Objects in VLISP
« Reply #21 on: March 19, 2008, 06:29:13 PM »
Oh, and here's a link to the original SincPac

jbuzbee

  • Swamp Rat
  • Posts: 851
Re: Exposing Objects in VLISP
« Reply #22 on: March 19, 2008, 07:14:52 PM »
Quote
BTW, since you know what you can do with VBA, why the trip into lisp land?

Because unlike Lisp - VBA's lifespan is nearing it's end!!!  And with OpenDCL you can do more, yes more, than basic VBA!!!   ;-)
James Buzbee
Windows 8

ML

  • Guest
Re: Exposing Objects in VLISP
« Reply #23 on: March 20, 2008, 10:25:00 AM »

Jeff!

Thank you very much!
Now that is what I am talking about Willis... Remember Arnold from Different Strokes? :)

Cool, I will definitely be using inspect.
And thanks for the pic, I will save that as a reference until I get use to it.

And, I did download sinc pak, thank you for that. I don't know what to do with it yet but I am sure I will learn with time.

Now, the big question, why VLISP?
My easy answer could be, why not.
However, I will elaborate....
My current boss is a very good LISP programmer, he has been at it for app. 20 years.
We do some VBA projects; may be not as much as I would like, but that is OK because now that I have been forced to learn some LISP, I am seeing great value in it, for some things.

Now, if I am going to do LISP as well as VBA, I think that I would prefer to have the capabilities of VLISP then just using a text editor...especially because I need the debugging tools. And realizing that I can access Objects, props and methods in there.

Mark


ML

  • Guest
Re: Exposing Objects in VLISP
« Reply #24 on: March 20, 2008, 10:30:43 AM »

Now JB

Quote
yep, with Vlisp a little knowledge is required. 

You are absolutely right but you are not saying that knowledge is not needed in VBA are you?
Man, I have spent the last 3 years or so learning VBA and still feel like I am barely scratching the service.

That little bit of code that I dropped to see all of the objects in VBA is not rockets science but for someone who did not realize that you can get all of that info with that little bit of code; that is very good info.

So, is a fact that VBA is going to be history?

Thanks to a friend, I have a pdf from AU
It shows how to convert your existing VBA projects to .net with very little effort.

That does not mean that we will not need to learn .net but it does mean that we can have our VBA projects up and running quickly if push came to shove.

If you don't have .net or access to it; you can download VB Express 2008 for free from Microsoft.

With that you can start learning .net.

May be I should dive it

Mark

Mark