Book a Demo

Author Topic: Model Views table  (Read 4771 times)

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Model Views table
« on: June 13, 2017, 08:56:31 pm »
Hi all,

I've got a situation where I need to set up a set of "Bookmark" views with preselected contents, so I thought I'd put together a little script -- but I can't find where the views are stored.

Does anyone know?

They've got to be in the database somewhere 'cos they're project-global, right?


/Uffe
My theories are always correct, just apply them to the right reality.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Model Views table
« Reply #1 on: June 13, 2017, 11:00:13 pm »
Look into %appdata% where you find a User Views directory.

q.

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: Model Views table
« Reply #2 on: June 13, 2017, 11:50:20 pm »
No, that's not it. These aren't user views, they're project-global. Everyone can see them.

/U
My theories are always correct, just apply them to the right reality.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Model Views table
« Reply #3 on: June 14, 2017, 12:04:47 am »
How do you define the user view then?

q.

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: Model Views table
« Reply #4 on: June 14, 2017, 12:12:17 am »
Found it! :)

Model views are stored in t_xrefsystem, with Type = 'PView'. Other columns differ depending on type. Sample below.

/Uffe


Root nodes:
    Namespace = 8
    Client = 0
    Supplier = 'ModelRoot'
    Link = NULL
    Description = 'vt=Cust;' for custom, as opposed to built-in (or MDG?), roots; blank for built-in ones.

Views folders:
    Namespace = 7
    Client = 0
    Supplier = the GUID of the parent root node
    Link = NULL

Slideshow folders:
    Namespace = 7
    Client = 0
    Supplier = the GUID of the parent views folder
    Link = NULL
    Description = slideshow details; 'APTime=5;AP=1;' for the default auto-play with five-second delay.

Search folders:
    Namespace = 9
    Client = 0
    Supplier = the GUID of the parent views folder
    Link = NULL
    Description = 'srchID={search GUID};'.

Favorites folders:
    Namespace = 10
    Client = appears to be sort order within parent views folder
    Supplier = the GUID of the parent views folder
    Link = NULL

Package in favorites folder:
    Namespace = 3
    Client = appears to be sort order within parent views folder
    Supplier = the GUID of the parent views folder
    Link = package GUID
    Description = 'sType=Package;'
My theories are always correct, just apply them to the right reality.