Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock 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
Dec 17, 2012
49
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.

 
Replies continue below

Recommended for you

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

Part and Inventory Search

Sponsor