It turns out that "w" is coming back as zero, so the calculation in the Set Displa Width is zero. Try changing it to something like
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
w = :Height << Get Display Width;
:Height << Set Display Width( 4 * 90 );
Here is the example taken from the Scripting Index for the Set Display Width message
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
w = :Height << Get Display Width;
:Height << Set Display Width( 2 * w );
When I paste the code, the width of the column it has not grown
It turns out that "w" is coming back as zero, so the calculation in the Set Displa Width is zero. Try changing it to something like
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
w = :Height << Get Display Width;
:Height << Set Display Width( 4 * 90 );
Here's a variation you might find useful
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
w = ((Text Box( dt:name[1], <<setbasefont( "datatable" ) ) << getpicture) << getsize)[1];
dt:name << Set Display Width( 1.2 * w );
Read the w= line from the inside -> out like this:
I chose Katie in line 1 to make this picture. I added 20% to avoid "Ka...".
At some font sizes, 10% might not be enough.
Also, you can make a data table, change almost anything, and use the red triangle->copyTableScript(NoData) option to see how JMP scripts the changes. Paste the copy into an editor to see it.