Author Topic: To check if a Package is a view or not  (Read 2898 times)

sandeep bhat

  • EA User
  • **
  • Posts: 36
  • Karma: +0/-0
    • View Profile
To check if a Package is a view or not
« on: June 18, 2014, 11:17:03 pm »
Hi,
I have a project which starts at Model, under that i have a view and under that view i have many packages. Is there any way i get to know by some property if its a view or a package? i tried debugging it all i see is in a view, the property Flags has some value isModel=1;VICON=4 and for the other packages the Flags property is empty.

qwerty

  • EA Guru
  • *****
  • Posts: 13544
  • Karma: +395/-300
  • I'm no guru at all
    • View Profile
Re: To check if a Package is a view or not
« Reply #1 on: June 19, 2014, 12:34:43 am »
The VICON tells you that it's a view and which kind. It's a simple enumeration. It's also documented in my Inside book.

q.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8030
  • Karma: +118/-20
    • View Profile
Re: To check if a Package is a view or not
« Reply #2 on: June 19, 2014, 09:08:36 am »
I would either be looking for the isModel=1. Either that or if it's parent doesn't have a parent.

sandeep bhat

  • EA User
  • **
  • Posts: 36
  • Karma: +0/-0
    • View Profile
Re: To check if a Package is a view or not
« Reply #3 on: June 19, 2014, 02:41:37 pm »
Thanks a lot Qwerty and Simon. Appreciate it!