NavigationUser login |
Automate the retrieval of embedded objects from Asset SuiteYour search for Visual Basic has me intrigued. The only connection between Asset Suite / PassPort and Visual Basic that I can think of is Portal/97. It’s doubtful I can be useful with whatever you’re up to, but I’m always curious about what people are doing and will help if I’m able to. Any chance you’re attempting to integrate MS Excel to api’s accessing Asset Suite / PassPort to do things like mass data loads?
By webmaster | Miscellaneous object embedding and linking (OLE) topics | add new comment
I think what you are sayingI think what you are saying is that you have a list of keys with which to access the entry in table TIDBLOB via a Portal/J panel? I’m unaware of a good method of driving Portal/J panels. I’ve not heard of anyone coming up with a low cost method of being able to open a P/J panel, via say an URL link and then drive the panel. The best I’ve seen is a product called Mercury LoadRunner which intercepts communications at socket level. It’s a steep learning curve and expensive to maintain. It’s suitable for a software company. ===== Suggest an approach of accessing the database and not using Portal/J. Get the OLE_OBJECT_ID. Having the OLE_OBJECT_ID, it is possible to read the OLE from TIDBLOB using readBlob.java and write it to a file. Getting the OLE_OBJECT_ID from various panels is very different; you’ll end up with several different SQLs. I’m going to assume the OLE is embedded (OLE_OBJECT_TYPE = ‘b’), otherwise you’d have the files. A hex editor can be used to add 2 bytes (1F 9D) at the beginning of the file and then use Unix uncompress to decompress the data. It’s also possible to modify (remove the check for the magic number of 1F 9D) and use UncompressInputStream.java to decompress the file. After the data has been read from TIDBLOB.OLE_OBJECT_BLOB and decompressed, you should have a file containing an OLE that can be opened via the application accessed via Portal/J and the Windows registry given TIDOBLOK.OLE_OBJECT_CLASS (example Word.Document.8). That is, once you have an OLE in a file that contains a Word doc, it can be opened using Word. I don’t know if it’s possible to untangle Portal/J and it’s usage of Native (Windows) services. ======= Is MS Word used as the application for accessing the OLE’s? I’d be interested in hearing if it’s not MS Word or Excel. By webmaster | reply
Thanks for the feedback andThanks for the feedback and advice. You’ve confirmed what I suspected…that I would have to work directly in the database tables, and that it would entail programming competence slightly beyond my current level. I’ve been able to use VBA to retrieve data from PassPort tables without hurting myself. But I’ve always banged my shins when trying to get to, understand and open the blob files. I’ve never worked with Java or Unix. To complete the story, the embedded images that I was trying to get to were generally raster files (opening with Imagenation Allview) or PDFs. I use Excel (and its MS Query function) for my PassPort queries, simply recording a query, then manipulating the SQL string to introduce variables that a casual user can then manipulate from the spreadsheet. The Excel queries have become popular, here, as a quick, user-friendly alternative to Crystal Reports. By Anonymous | reply
Would you check one thing?Would you check one thing? On your PC, open a Windows command prompt and type in: java –version It’s possible you have a Java Virtual Machine installed on your PC and, if so, it might not be so difficult. What’s needed is a Sun JVM (not MicroSofts) at version 1.4.x or higher. The output would look something like this: java version "1.4.2_13" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_13-b06) Java HotSpot(TM) Client VM (build 1.4.2_13-b06, mixed mode) A JDBC driver is needed to access the database. If you let me know what database and version you are on, I can probably let you know the file name, for example Oracle version 10 uses ojdbc5.jar which could very well be on your PC in a directory like c:\oracle\ora111\jdbc\lib. If you access the PassPort database using Excel, most likely you are using an ODBC driver and have a JDBC driver. If the Java Virtual Machine and a JDBC driver are available on a PC running Windows, this is doable and I think you’ll be surprised. I’m interested in how Portal/J was defined to handle the raster files. I’ve always been interested in how this is done and haven’t contracted at a site doing it. Would it be possible to let me know the value of TIDOBLOK.OLE_OBJECT_CLASS and TIDBLOB.OLE_OBJECT_TYPE (there are probably many rows) for one of the embedded raster files? By webmaster | reply
You are correct on your JavaYou are correct on your Java supposition. And you appear to be on target regarding Oracle. Here’s the population of jdbc\lib: I don’t retrieve any TIDOBLOK.OLE_OBJECT_CLASS and TIDBLOB.OLE_OBJECT_TYPE. Starting from TIDDOHOF with a known document, the field TIDDOHOF_OLE_OBJECT_ID is blank, so there’s no correlating data in TIDOBLOK or TIDBLOB. For instance: The properties of the retrieved document show that the file name is a combination of the Reference number and sub: I infer that the image file is located outside the PassPort table structure, and would require some knowledge of the local server terrain to automate retrievals. BTW, I’ve already retrieved all the documents by brute force, with some VBA assistance to facilitate steps. A milestone had to be met, and it was. But it’s still useful to better understand PassPort’s nuances, for future chores. By Anonymous | reply
|
automate the retrieval of drawings (OLE images)
I was investigating how I might be able to automate the retrieval of drawings (OLE images) from PassPort / Portal J. I had a long list of documents in an Excel spreadsheet. Each drawing was already linked to the URL of the PassPort panel that contained the image. My immediate goal was to simply open the image using VBA, then to do a PDF print of the image, and save it under a title from the Excel spreadsheet.