September 28, 200817 yr Is there a way to create a list of layout names with associated tables, as shown in the Set Layout Order dialog box?
September 28, 200817 yr What are you trying to use this for? Since you have advanced, you should be able to pull this out from the DDR.
September 28, 200817 yr Author I want it for documentation purposes. The DDR doesn't do it cleanly. I think it would be a great feature to have.
September 28, 200817 yr John, You can easily get the layout names in your file with the design function LayoutNames(filename). This will return a value list of all the layout names. Now the problem is to get the tables... You can loop through the returned value list of layout names. But what to do with them. The design function FieldNames(filename;layoutname) can return the field names in a value list. Unforturnately, the fields local to the TO that supports the layout don't tell what the TO name is. All the related fields do identify their TO (TableOccuranceName::FieldName). So, if every layout has related fields on it and you use a TO naming convention like anchor/buoy (base_to.next_to.THIS_TO), you could extract the base TO name. This is not a good bet though. Things would surely fail. As an alternative, you could take responsibility for always adding a named text object on the layout that identifies the Table Occurrence. So every layout would have text on the layout that is the TO name and which is defined as an object named, say, "TO_Name". Then, when you step through the value list that holds the layout names, you could get this object on each layout and examine its content using the Logical function GetLayoutObjectAttribute(). If you ever forgot to add the object to the layout or miss-typed the text, things would fail. But this could give you what you need. Regards, Don
September 28, 200817 yr There is a Get(LayoutTableName) function, which returns the table occurrence of the current table (not the "base" table name). So you could use you LayoutNames() result, then Go To Layout [ by name ], and each, and get the TO name.
October 23, 200817 yr Author I don't quite see how to do this. Will it generate a list of layouts and associated TOs?
Create an account or sign in to comment