Author Topic: C# addin - listing all objects inside a project  (Read 602 times)

jk

  • EA Novice
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
Re: C# addin - listing all objects inside a project
« Reply #15 on: July 12, 2018, 06:41:11 pm »
Ok thanks,

but -sorry- I do not know how to print (in the console) or in a file the respective ElementIDs.

Code: [Select]
var elementCollection as EA.Collection;
elementCollection = Repository.GetElementSet("select t_object.Object_ID from t_object where object_type = 'Port' and (select count(*) from t_connector where t_connector.End_Object_ID = t_object.Object_ID) = 0",2);
// ...here I would like to get the console output/file write...of all respective IDs which are not connected

To the second issue (SScripter.exe error): When I run it in debug mode, I can not copy the whole debug output to clipboard.


 :-[
« Last Edit: July 12, 2018, 06:43:40 pm by jk »

qwerty

  • EA Guru
  • *****
  • Posts: 9783
  • Karma: +181/-153
  • I'm no guru at all
    • View Profile
Re: C# addin - listing all objects inside a project
« Reply #16 on: July 12, 2018, 06:50:07 pm »
As the help says: it's a collection. So you need to iterate and use GetAt.

q.