Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access SAP file through OAPI without opening the file

Status
Not open for further replies.

darkjmf1

Structural
Joined
Dec 17, 2012
Messages
50
Location
ES
Hello,
I know how to access a SAP file through the OAPI from VBA, e.g.:
Set ObjetoSap = New SAP2000v16.SapObject
Set ModeloSap = ObjetoSap.SapModel
ObjetoSap.ApplicationStart
ret = ModeloSap.InitializeNewModel
ret = ModeloSap.File.OpenFile(txt_fichero.Text)
Here I include the code needed to read whatever I need from the SAP file
ObjetoSap.ApplicationExit (True)
Set ModeloSap = Nothing
Set ObjetoSap = Nothing​

My question is simple: How could I access the information included in the SAP file without opening such file or even opening the program?

My first approach would be something like:
Set ObjetoSap = New SAP2000v16.SapObject
Set ModeloSap = ObjetoSap.SapModel
ret = ModeloSap.File.OpenFile(txt_fichero.Text)
Here I include the code needed to read whatever I need from the SAP file
Set ModeloSap = Nothing
Set ObjetoSap = Nothing​

Unfortunately it is not working.
Am I asking for something impossible? If not, could somebody help me in the right direction?
Thanks in advance.

 
Any ideas about this issue?
I would really appreciate some help.
Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top