AVEVA Community
AVEVA Community
  • Site
  • User
  • Site
  • Search
  • User
PDMS/E3D Forum
  • AVEVA World
PDMS/E3D Forum
PDMS Quick Tips & Customizations C# Element collection
  • Forums
  • Resources
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Replies 3 replies
  • Subscribers 2 subscribers
  • Views 86 views
  • Users 0 members are here
Options
  • Share
  • More
  • Cancel
Related

C# Element collection

sivakumar
sivakumar over 9 years ago
 
  • Sign in to reply
  • Cancel
  • sivakumar
    sivakumar over 9 years ago
    Hi everyone,

    im new to c#, Could anyone say how to collect particular element from Below CE.

    By using dbelementcollection in pdmsfilter.dll.

    thanks.
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • swami
    swami over 7 years ago
    loop thro dbelement.Members
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Bruce
    Bruce over 7 years ago
    //set CE element
    DbElement CE = CurrentElement.Element;
    //set a filter that filter the element with type == BRANCH
    TypeFilter branFilter = new TypeFilter(DbElementTypeInstance.BRANCH);
    //collecti all Bran in CE using above filter
    DBElementCollection branCollection = new DBElementCollection(CE, branFilter);
    //get all element in branch collection
    foreach (DbElement branElement in branCollection)
                   { //do something}
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel