×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Access SAP file through OAPI without opening the file

Access SAP file through OAPI without opening the file

Access SAP file through OAPI without opening the file

(OP)
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.

RE: Access SAP file through OAPI without opening the file

(OP)
Any ideas about this issue?
I would really appreciate some help.
Thanks.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources