john9210 Posted September 28, 2008 Posted September 28, 2008 Is there a way to create a list of layout names with associated tables, as shown in the Set Layout Order dialog box?
mr_vodka Posted September 28, 2008 Posted September 28, 2008 What are you trying to use this for? Since you have advanced, you should be able to pull this out from the DDR.
john9210 Posted September 28, 2008 Author Posted September 28, 2008 I want it for documentation purposes. The DDR doesn't do it cleanly. I think it would be a great feature to have.
Lee Smith Posted September 28, 2008 Posted September 28, 2008 Take a look at inspector and see if this is what you need Lee
Lee Smith Posted September 28, 2008 Posted September 28, 2008 Take a look at inspector and see if this is what you need Lee
dreamingmind Posted September 28, 2008 Posted September 28, 2008 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
Fenton Posted September 28, 2008 Posted September 28, 2008 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.
dreamingmind Posted September 29, 2008 Posted September 29, 2008 Well there ya go! The whole magilla! Don
john9210 Posted October 23, 2008 Author Posted October 23, 2008 I don't quite see how to do this. Will it generate a list of layouts and associated TOs?
Recommended Posts
This topic is 5875 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now