Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic DOORS (steve huntington)
Decrease font size
Increase font size
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
Search Topic Search Topic
Topic Tools Topic Tools
Quick Reply Quick Reply
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
 6-Feb-2006 14:42
User is offline View Users Profile Print this message


Tarun Inabathuni

Posts: 59
Joined: 18-Jan-2005

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
Report this to a Moderator Report this to a Moderator
 6-Feb-2006 15:15
User is offline View Users Profile Print this message


ron lewis

Posts: 650
Joined: 20-Sep-2004

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"
}
Report this to a Moderator Report this to a Moderator
 8-Feb-2006 20:28
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

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()
Report this to a Moderator Report this to a Moderator
 29-Oct-2008 20:53
User is offline View Users Profile Print this message


anant mitra

Posts: 50
Joined: 27-Jul-2007

Is the number that is returned in bytes or KB?

Thanks.

Originally posted by: ron lewis

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"

}
Report this to a Moderator Report this to a Moderator
 31-Oct-2008 00:46
User is offline View Users Profile Print this message


Chris Jones

Posts: 177
Joined: 1-Jul-2005

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
Report this to a Moderator Report this to a Moderator
 3-Nov-2008 12:46
User is offline View Users Profile Print this message


ron lewis

Posts: 650
Joined: 20-Sep-2004

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
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 1 users logged in.
The most users ever online was 15 on 15-Jan-2009 at 16:36.
There are currently 0 guests browsing this forum, which makes a total of 1 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.