Hi all,
I wonder if there is the option, within the config.pro or other, to set the width of the columns when you open the parameters windows.
Thanks
Bye
Solved! Go to Solution.
Yes you can. You can save the currently layout as an XML file and then automatically load it with the config option parameter_dialog_setup_file.
------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------
Yes you can. You can save the currently layout as an XML file and then automatically load it with the config option parameter_dialog_setup_file.
------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------
Tom,
I never knew about this so thank you.
However, the column size won't stay as wide as I set it. Still using Creo 2.
Are you saving the XML file and then restarting Creo2 each time you adjust a width?
I have found it easier to adjust the column width by editing the XML file directly in notepad/wordpad.
I am restarting Creo each time. But I don't see the "size" line in the file except for the below. The column size is not shown.
<parameter_ui_configuration>
<dialog_type name="PARAMETER DIALOG">
<dialog_size>
<height>618</height>
<width>734</width>
</dialog_size>
<dialog_location>
<horizontal_pos>1083</horizontal_pos>
<vertical_pos>230</vertical_pos>
</dialog_location>
<layout_visibility>
<parameters>Yes</parameters>
<relations>No</relations>
</layout_visibility>
<displayed_columns/>
<sortby>
<column name="name" order="Descend"/>
</sortby>
<filters>
<filter name="Default" source="Standard">
<table_id>Parameter Rule</table_id>
</filter>
<filter name="Current and all subcontexts" source="Standard">
<table_id>Parameter Rule</table_id>
</filter>
...etc...
Displayed columns section
<displayed_columns>
<column_name = "Name" width = "15" />
<column_name = "type" width = "18" />
etc
</displayed_columns
This sets the name of the column, its order in the table and the width.
It does show in the document Tom copied.
Oh. So we have to add that manually since it is not in there when I save the configuration file.
Have you tried a capital "N" for Name instead of "name"? That would match what it shows in the table.
So is there a bug?
Yes, but it doesn't work yet
I was able to manually edit it and get the width to stay. But I can't get the sort by to work.
When I use the "Save Configuration As" it only has "<displayed_columns/> I had to enter the first part "<displayed_columns>".
However, as you see I added the "designate" column to display but it doesn't show. The others listed above do show.
Steve, did you get it to work?
I will look further at my work system and post the file here. It works fine in Creo 2. In my case, we did have a mapkey to set the column widths and then I saved the configuration after running the mapkey and I wonder if that is why I get the column display lines.
When I create a new file in Creo 2, 3 & 4, the syntax is identical and only the one column_name line, like in Steve's listing. I tried to add the width setting, but it did not work.
Here is the top portion of a hand-edited file based on the one I saved from Creo2.
I added the column name lines after changing the <displayed_columns/> line to just <displayed_columns> and adding the </displayed_columns> line at the end.
When I started Creo4, opened a file and went to Tools-Parameters, I got the window to display as set.
The underscore between the word column and name doesn't take; so the word name becomes red (editing with Notepad++ as in the pics).
Furthermore the name of the columns, inside the inverted commas, must starts with the lowercase letter.
My mistake on the underscore between column and name yesterday. See the sample partial listing I just added for the proper syntax.
This is what the file looks like after setting the columns widths and the sorting then saving the config file. Noticed the slash at the end of <displayed_columns>.
I made it look like this but the sorting was not recognized.
The slash in <displayed_columns/> is in the wrong spot. I had to move the slash to the front: </displayed_columns> Once I moved the slash the sorting was recognized.
The '/' in the field names is a terminator from old un*x programming.
<display_columns> opens the section
</displayed_columns> closes the section
When done on a single line <displayed_columns/> opens and closes the section with no definition lines.
Not sure why one column is not displaying properly, unless that is not the 'internal' name.
Not being the internal name was my guess.
Does anyone know how to find that out?
I find it interesting that is the only column you don't have in one of your posts above.
There it is. It's called "attribute". Not "designate".
Thank you!
The Parameter table on screen has that column heading as 'Designate', but the file for setting width has it listed as 'Attribute'.
But I still can't get it to display the Designate column.