Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Referencing an object from another object in the stack
Message
General information
Forum:
Visual Basic
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00406968
Message ID:
00407159
Views:
32
>>Move this line to the «General Declarations» sections:
>>
dim oApp as bm_Application
>
>I understand that. Here is my problem, I'm just using the calling module for testing. The project will be compiled as a inproc .dll. I'll create the oApp object from Lisp in AutoCad, then call the oApp.ShowForm method. There is no way in lisp AFAIK to deal with making the oApp var global or public. Everything the VB parts needs will have to be declared in the BM_Application class.
>
>Any ideas?

I can't help on this. I never played with AutoCad. Isn't AutoCad has VBA in it (in addition to Lisp)?

>
>>Move this line to the «Form_Load» event:
>>
set oApp = new bm_Application
>
>Doesn't that create a new instance of bm_Application in the existing var, effectively replacing it? When the oApp is instanciated, I would like to store some info in it's properties that are available to any of the objects it creates. For instance, a couple paths, a reference to the AutoCad app and document, etc...

This line doesn't create a new instance. The first line at the top (the Dim line) is there to declare the object variable (no instance is created then). The New keyword creates the instance.

To store value in the instance properties, properties must be declared public and you use this syntax:
oApp.Prop1 = "New Value"
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform