Board index » delphi » ???? OLE, How to get Obj. Info from Arena ????

???? OLE, How to get Obj. Info from Arena ????

Ok I am pretty new In the OLE business, so any info is welcome.

I am using Arena, wich is a simulation tool, and I am trying to make
some sort of a front-end in Delphi 3.
My goal is that the user can select a couple of things in the D3 Front-
end and the front end builds the model in Arena.

It's possible to communicatie with Arena using OLE and I managed to start
Arena and put a Object "module" on screen in Arena.
But How do I know what methodes and properties are available in the
various OLE-Arena objects that can be called through OLE???

I also use the CreateOleObject and put it in a Variant Type var, is this
the correct way?  Cause you also have the OleVariant Type!

Also resources of OLE / Active X / Why, when, how, are welcome. Like what
is Automation OLE, why is the OleContainer???

So if anyone knows an answer to any of my questions, please dont hasitate
to answer.

Thanks,
Ido de Lepper
ilep...@fac.fbk.eur.nl

 

Re:???? OLE, How to get Obj. Info from Arena ????


Quote
ilepper wrote in message ...

<snip>

Quote
>But How do I know what methodes and properties are available in the
>various OLE-Arena objects that can be called through OLE???

Importing the Arena Type Library (if it has one) will give you a Pascal unit
with what you need in it.

Quote

>I also use the CreateOleObject and put it in a Variant Type var, is this
>the correct way?  Cause you also have the OleVariant Type!

You can use either one.

Reece Watkins

Quote
>Thanks,
>Ido de Lepper
>ilep...@fac.fbk.eur.nl

Re:???? OLE, How to get Obj. Info from Arena ????


Ido,

Quote
>But How do I know what methodes and properties are available in the
>various OLE-Arena objects that can be called through OLE???

Start Visual Basic, and press F4. You get an overview of all available
procedures, and properties,

or,

read the document that I can't find at the moment, but I have, somewhere.
This documents contains a list with the same information as you would get
from Visual Basic. It is small developer's quickreference guide. I will send
it later to you via e-mail,

or,

you could search in the Arena help for Overview of the Arena Object Model,
and than select Automation Programmer's Reference. This will describe the
Arena available objects.

Quote
>Also resources of OLE / Active X / Why, when, how, are welcome. Like what
>is Automation OLE, why is the OleContainer???

You cannot use a OleContainer to control Arena, sorry.

Quote
>I am using Arena, wich is a simulation tool, and I am trying to make
>some sort of a front-end in Delphi 3.
>My goal is that the user can select a couple of things in the D3 Front-
>end and the front end builds the model in Arena.

To create a front-end is very nice. A front-end that creates the model even
nicer. BUT, it is very slow. I have used to following approach (done in VB):

1) create CSV-files (text, so you can write them without any database
management system). These CSV-files contain all the values of your modules.
2) import the files, via the standard import function of Arena (you can
automate that via OLE).
3) draw the routes between the modules.

This is done much faster than creating each module (and setting the values)
separetely via OLE Automation. The performance is 10 times faster. So, look
into that, if this is feasable for your project.

Quote
>It's possible to communicatie with Arena using OLE and I managed to start
>Arena and put a Object "module" on screen in Arena.

I'd like to see some sample code of that, if possible. I have been playing
around with Arena, and finally decided to do it with VB. Arena is shipped
with all the nice examples made in VB, and that makes it a lot easier.
Second to that, writing code to control Arena is much easier done in VB than
in Delphi <snif>.

Quote

>I also use the CreateOleObject and put it in a Variant Type var, is this
>the correct way?  Cause you also have the OleVariant Type!

I really don't know. In VB a Variant is the same as a OleVariant, so I have
no experience with that. From a Delphi point of view I would suggest to use
the OleVariant.

Sincerely,

Fred Jansma,
Incontrol Business Engineers.

Other Threads