cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

Width of columns

gfraulini
17-Peridot

Width of columns

larghezza_colonne.JPG

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

1 ACCEPTED SOLUTION

Accepted Solutions
TomU
23-Emerald IV
(To:gfraulini)

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.

------------------------------------------------------------------------------------------------------------------

------------------------------------------------------------------------------------------------------------------

Creo Parametric Help Center

View solution in original post

22 REPLIES 22
TomU
23-Emerald IV
(To:gfraulini)

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.

------------------------------------------------------------------------------------------------------------------

------------------------------------------------------------------------------------------------------------------

Creo Parametric Help Center

STEVEG
21-Topaz I
(To:TomU)

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.

BenLoosli
23-Emerald II
(To:STEVEG)

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.

STEVEG
21-Topaz I
(To:BenLoosli)

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...

BenLoosli
23-Emerald II
(To:STEVEG)

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.

STEVEG
21-Topaz I
(To:BenLoosli)

Oh.  So we have to add that manually since it is not in there when I save the configuration file.

I've tried but it doesn't work...

parameters.JPG

STEVEG
21-Topaz I
(To:gfraulini)

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?

gfraulini
17-Peridot
(To:STEVEG)

Yes, but it doesn't work yet

STEVEG
21-Topaz I
(To:gfraulini)

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>".

STEVEG
21-Topaz I
(To:STEVEG)

However, as you see I added the "designate" column to display but it doesn't show.  The others listed above do show.

BenLoosli
23-Emerald II
(To:gfraulini)

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.

BenLoosli
23-Emerald II
(To:BenLoosli)

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.

BenLoosli
23-Emerald II
(To:gfraulini)

My mistake on the underscore between column and name yesterday. See the sample partial listing I just added for the proper syntax.

STEVEG
21-Topaz I
(To:BenLoosli)

 

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.

 

BenLoosli
23-Emerald II
(To:STEVEG)

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.

STEVEG
21-Topaz I
(To:BenLoosli)

Not being the internal name was my guess.

Does anyone know how to find that out?

STEVEG
21-Topaz I
(To:BenLoosli)

I find it interesting that is the only column you don't have in one of your posts above.

STEVEG
21-Topaz I
(To:STEVEG)

There it is.  It's called "attribute".  Not "designate".

Thank you!

BenLoosli
23-Emerald II
(To:STEVEG)

The Parameter table on screen has that column heading as 'Designate', but the file for setting width has it listed as 'Attribute'.

STEVEG
21-Topaz I
(To:BenLoosli)

But I still can't get it to display the Designate column.

Top Tags