- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have the following problem.
I am using a commercial program for static calculations called RSTAB.
Now this program has the possibility to exchange data by a COM interface.
I have a example programme written in Excel VB.
Now since I am a 'old' fortraneer and not a VB programmer, I want to do the same thing using CVF6.6.
That is exchange data between RSTAB an my own Program.
I have a type library called RSTAB.ltb. I converted this library using the Module Wizard to a .f90 file.
This file is rather long (more than 9000 lines). It contains mostly type declarations and functions.
When compiling this file is turned into a .lib file.
My basic problem is : How to connect my program to the COM Interface.
I studied the CVF Examples ( e.g. Autodice etc.) and the CFV Manual, but I still don't get the trick.
I guess I have to use COMCREATEOBJECT somehow to do the connection.
My program has the following lines:
use RSTABCOM ! <== this is the converted .tlb file
integer*4 :: status,app
CALL COMINITIALIZE(status)
CALL COMCREATEOBJECT ("RSTAB", app, status)
But this does not work. I guess the name "RSTAB" is wrong.
What name do I have to use in the COMCREATEOBJECT call ????
I think this is my basic problem.
The VB Code starts with the following lines
------------------------------------------------
Dim RSApp As RSTAB.IrsApplication
Dim RSPos As RSTAB.Position
Dim RSTop As RSTAB.IrsTopology
Private Sub CommandButton1_Click()
Set RSPos = GetObject(, "RSTAB.Position")
Set RSApp = RSPos.rsGetApplication
RSApp.rsLockLicence
Set RSTop = RSPos.rsGetTopology
.
.
---------------------------------------------------
RSTAB is the name of the commercial program.
Can somebody help me since I am really stuck.
Thanks
Klaus
I am using a commercial program for static calculations called RSTAB.
Now this program has the possibility to exchange data by a COM interface.
I have a example programme written in Excel VB.
Now since I am a 'old' fortraneer and not a VB programmer, I want to do the same thing using CVF6.6.
That is exchange data between RSTAB an my own Program.
I have a type library called RSTAB.ltb. I converted this library using the Module Wizard to a .f90 file.
This file is rather long (more than 9000 lines). It contains mostly type declarations and functions.
When compiling this file is turned into a .lib file.
My basic problem is : How to connect my program to the COM Interface.
I studied the CVF Examples ( e.g. Autodice etc.) and the CFV Manual, but I still don't get the trick.
I guess I have to use COMCREATEOBJECT somehow to do the connection.
My program has the following lines:
use RSTABCOM ! <== this is the converted .tlb file
integer*4 :: status,app
CALL COMINITIALIZE(status)
CALL COMCREATEOBJECT ("RSTAB", app, status)
But this does not work. I guess the name "RSTAB" is wrong.
What name do I have to use in the COMCREATEOBJECT call ????
I think this is my basic problem.
The VB Code starts with the following lines
------------------------------------------------
Dim RSApp As RSTAB.IrsApplication
Dim RSPos As RSTAB.Position
Dim RSTop As RSTAB.IrsTopology
Private Sub CommandButton1_Click()
Set RSPos = GetObject(, "RSTAB.Position")
Set RSApp = RSPos.rsGetApplication
RSApp.rsLockLicence
Set RSTop = RSPos.rsGetTopology
.
.
---------------------------------------------------
RSTAB is the name of the commercial program.
Can somebody help me since I am really stuck.
Thanks
Klaus
Link Copied
0 Replies
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page