AnsweredAssumed Answered

How to resize an OLE Object on a Drawing sheet?

Question asked by Filipe Venceslau on Dec 17, 2011
Latest reply on Mar 30, 2019 by Mandar Parkhi

I'm trying to automatically import and link a bom I have created in excel (xlsx) to a drawing sheet. I'm using ModelDoc2.Extension.InsertObjectFromFile to insert the xlsx, it displays correctly on the sheet, and I can position it correctly but I can't find a way of dimensioning it through code, to make it fit properly within the sheet.

When I look at the interface members, the closest thing I can find if the Boudary property and methods, which I don't understand quite well either.


I can manage to resize and move the object manually, but I just can't figure out how to do it through code.


Does anyone have any idea what I can do? Or maybe a different suggestion?

I was using the solidworks bom earlier, but since I log all my data in an external database, I have decided that I prefer to build my own BOM in excel and import it to the drawing as a linked OLE object.


Adjusting these properties manaually does the trick (as well as simply resizing using the diagonal arrow from the corner of the object), but I can't find a way of accessing them through API interface.


(popup menu from right clicking ole object)




Here's a shot of the ole object (two top tables) inserted in my drawing. I basically need to automatically adjust the width (which I already did manually) to properly fit the drawing.



Cheers, and thanks in advance