Logout Developer Knowledgebase Search Adobe Partners Main Adobe Solution Partner Finder Adobe Solution Partner Program Support Developer Knowledgebase Adobe Solution Partner Program Products & Technology Adobe
Developer Knowledgebase

Knowledgebase HomeInCopy KB

Overview
Software Development Kits
Developer Knowledgebase
Support
Legal Notices
Feedback
Adobe Solution Partner Program
Join
Find a Solution Partner

Product
InCopy
 
Version
2.0
 
Last Edited
08-Apr-2005
 
Document
53856

How To: Remove stories from the storylist panel

Summary
In the Galley and Story view you can remove stories from the storylist panel by removing them from the Incopy story list.

Issue
When I open a layout in InCopy, all linked stories are listed in both the Galley and Story views. In addition, all linked stories as well as embedded text is visible in the Layout view. Is there a way to remove stories from the lists in the Galley and Story view without removing the corresponding frames from the Layout view?

Solution
You can remove the set of linked stories from the Incopy Story List. The removed linked stories would not be shown in the Galley and Story view. The Layout view would still show all stories including those removed from the other views. Here is the code snippet that shows how to do it.

do{
  //Initialize the document here
  InterfacePtr<IDocument> doc;
  IDataBase* db = ::GetDataBase(doc);
  InterfacePtr<IInCopyStoryList> icsList(db,db->GetRootUID(),IID_IINCOPYSTORYLIST);
  if (!icsList)
    break;  
  db->BeginTransaction();
  // Now we filter the InCopyStoryList
  for (int32 i = (icsList->GetStoryCount() - 1); i >= 0; --i)
  {
    UID storyToRemove = icsList->GetNthStoryUID(i);
    icsList->RemoveStory(storyToRemove);
  }
  db->EndTransaction();
  Utils<IGalleyUtils> galleyUtils;
  IControlView * gView = galleyUtils->FindGalleyView(doc);
  InterfacePtr<IStoryManager> storyManager(gView,   UseDefaultIID());
  if (!storyManager)
    break;
  //Resync the currently open view with the changed InCopyStoryList
  storyManager->SyncStoriesToManaged();
}while(1);

You will also have to redraw the StoryList panel in case it is already visible.

back to top
Was this Knowledgebase document helpful? Yes  No
The articles in this knowledgebase are intended for use by software programmers currently using an Adobe SDK to extend or customize an Adobe product. These articles may be highly technical in nature.
If you have questions about an Adobe Product that are not related to development or an SDK product please visit: http://adobe.com/support/main.html
Copyright © Adobe Systems Incorporated. All rights reserved.
Terms of Use
Online Privacy Policy