The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum for Programming
 Forum for Origin C
 finding different type of origin objects

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
misrapr Posted - 01/05/2008 : 05:03:47 AM
Origin Version (Select Help-->About Origin): 8 pro
Operating System: win xp pro

How to find or list the names of all the objects of a particular kind present in active folder. For example let us say find the names of all the worksheets in the active folder?
1   L A T E S T    R E P L I E S    (Newest First)
cpyang Posted - 01/05/2008 : 5:23:13 PM
The following code shows how to loop active folder to get down to each column in sheets:

 
void list_all()
{
Folder fld = Application.ActiveFolder();
foreach(PageBase pb in fld.Pages)
{
WorksheetPage wp = pb;
if(!wp)
continue;// not wkbook

printf("Book:%s - %s\n", wp.GetName(), wp.GetLongName());
int nn = 1;
foreach(Layer ly in wp.Layers)
{
Worksheet wks = ly;
printf(" %d:%s\n", nn++,wks.GetName());
int kk = 1;
foreach(Column cc in wks.Columns)
{
printf(" %d:Column(%s)\n", kk++, cc.GetName());
}
}
}
}






CP



The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000