In DxDesigner it is possible to place embedded OLE objects.
Is it possible to get information about those objects with Automation programs?
I need the file path, the file type, the coordinate and the size.
I find nothing in the automation help files about OLE objects.
I read the help documentation as well.
I searched in communities and chats.
I looked into Visual Studio for not-documented features.
Unfortunately I found nothing (neither).
Nevertheless, I am hoping for somebody who found a way.
I can only answer some of your questions, and only by experimentation. OLE objects are stored in the OLE\sch subfolder of the project. If a filename in the subfolder matches the FULL_NAME of a schematic.sheet, then that schematic.sheet contains OLE objects; otherwise, the objects in the file do not exist in the schematic (i.e. the file is garbage). If you open the file, and skip the initial 2084 bytes (characters), the next four sets of 32 bits contain the bounding box coordinates (Xmin,Ymin,Xmax,Ymax) in ten nanometer units for the first OLE object on the sheet. If your schematic is in inches, divide each value by 2540000. I don't know how the source image filename and filetype are managed, since they don't seem to reside in an ascii dump of the file. I suspect that they are discarded in favor of only keeping the image bitmap in the file. (You can verify that by inserting an object on a sheet, then modifying the source image, and checking to see if it updates on the sheet.)
The files in the OLE/sch directory are containers (Compound file or Device Independent Bitmap). If you copy it to foo.dib, you can unpack it with most un-zip programs. You will get several files (e.g. Contents, CompObj, ...). They are all binary and I still do not find any file name or path.
Your hint to get the coordinates is helpful, thank you. But I have to check when there are several OLE objects on one sheet.
If the OLE object is updated, if the file is edited, you can select in the dailog, when you are creating the OLE object.
But as long as I don't know the format of these binary files, it makes no sense to try to read these files. I am not a hacker. ;-)
That was the reason to try the Automation interface.
But thank you for trying.
Given that these are called OLE objects, the binary files are most likely in some Microsoft format. I did more playing with multiple objects of different types on a sheet, and I can find the bounding boxes in the file, but can't make full sense out of their byte positioning. ( By the way, I prefer to call it reverse engineering, or reveng as an abbreviation. ;-) ) I also ran the Unix strings command on the file, and found a few items of interest, but no actual pathname for the images. And I tried the following two lines of automation in DxDesigner, with some of the objects selected:
Set Data = ActiveView.Query(VDM_ALL,VD_SELECTED)
The value displayed was 0. To me, this is prime material for a service request/defect report. If I put my object in your database, I should have the ability to access the data related to my object through your automation. Anything short of that is a deficiency.
That is what I found out as well. But thanks for your help, anyway.
I already started a service request. Peter tried and helped me a lot.
He also advised me to start this community request.
But at the end he gave up as well and closed the SR.
I think my company is to small, that Mentor will enhance their Automation interface.
Retrieving data ...