![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: OLE size in Objects Topic Summary: Find OLE size in the Objects Created On: 6-Feb-2006 14:42 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
Hi All
I am currently facing a problem with a module which has lot of Pictures as OLEs,the module takes a lot of time to load and it is getting very hard to work on it.I suspect there are some Objects which have very heavy OLE.Is it possible from DXL to find the size of OLE embedded in a Object text. Thanks and Regards Tarun |
|
![]() |
|
![]() |
|
You can get an approximation with something like this
//demo /* show approximate size of ole objects*/ Object o Module m=current string s int i for o in m do { s= richTextWithOle(o."Object Text" ) i = length(s) if(oleIsObject(o)) print identifier o " size =" i "\n" } |
|
![]() |
|
![]() |
|
Lewis's code finds OLE diagrams in the Object Text but won't find it in some other Text attribute.
Also, don't confuse "OLE" with a DOORS "Picture". The following function determines if the object has a Picture in it. I don't know how to determine the size of the picture. - Louie //******************** bool fHasPicture(Object obj) { // Determine if the object has a "Picture" in it // (not an OLE object) if (null obj) return(false) string Name = getPictName(obj) int Format = getPictFormat(obj) return(!null Name and Format != formatUNKNOWN) } // end fHasPicture() |
|
![]() |
|
![]() |
|
Is the number that is returned in bytes or KB?
Thanks. You can get an approximation with something like this //demo /* show approximate size of ole objects*/ Object o Module m=current string s int i for o in m do { s= richTextWithOle(o."Object Text" ) i = length(s) if(oleIsObject(o)) print identifier o " size =" i "\n" } |
|
![]() |
|
![]() |
|
It wouldn't be either, since he's just counting the number of characters in the object text RTF. I believe RTF stores its embedded OLEs as the text representation of the hex data, i.e. if a raw byte in your OLE is 0xFF, it's stored as "ff" in the RTF.
So I think the very approximated size in bytes would be somewhere around (i / 2) in Ron's code, albeit less because of any actual object text, RTF markup, etc. Chris |
|
![]() |
|
![]() |
|
Anant,
I stored a small bitmap ole object as an encoded string into notepad that had a length of 473,977 characters and the properties of notepad said 464 k bytes. If you subtract off any non ole text you might have a few hundred characters so the bottom line is the demo script will not be off by very much if you consider 1000 characters = 1 k bytes. However, when zip (DOORS data is compressed), the size of the file was 3 k -- a 99% percent compression rate. So what numbers you want to use depends upon you. Edited: 3-Nov-2008 at 14:22 by ron lewis |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
OLE size in Objects
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.