Measurements' descriptions : Make accessible to Users when editing Formulas

Hi,

I think it would be advantageous to let the users access (Read Only), descriptions for items selected from the measurements file and local variables tables.

Local Variables Table: (.SMD2)

Included Measurements File: (.SMIS / .SMMS)

(please note: the example text in the above ‘Description’ is quite extensive and describes in detail the steps required to reach the desired results: [ *Example Formula: (((2 - 1) / 2) * 100) :: (((Stretched_Length - Relaxed_Length) / Stretched_Length) * 100)

To calculate the percentage of stretch in an elastic material, follow these steps:*

Measure the Original Length (L0): Measure the length of the material before stretching it. This is your starting length (L0). Stretch the Material: Extend the material to the desired length. Measure the Stretched Length (L1): Calculate the Stretch: Use the formula to calculate the percentage of stretch: Percentage of Stretch = (((𝐿1 − 𝐿0) / L0) × 100) ]

  • The above is only a minute sample of descriptions which include instructions for use.

These two areas store measurement data: formulas, (descriptive) names and descriptions of the item. I at least use these quite extensively as do many, if not everyone else!

I also need, when I have created an entry in the dim and distant past (yesterday?), to be ably to see exactly what this does and if it also need modifications - I create entries with ‘Place Holder’ data and provide detailed descriptions of what this does and what need to be altered for a specific use.

Unfortunately, the data displayed during formula editing does not include any description text, The name is there (but not copy able), I think the addition of Copy-Able description text field/box would be of great help and benefit for all of us.

Formula Edit Dialogue:

Having resize-able text-boxes and / or copy-able text, would be ideal.strong text

1 Like

I could certainly add the description for the selected measurement or custom variable to the fx editor, but why make the description or for that matter the name copyable? In other words what purpose does it serve to open the fx editor to copy the name or description, and where are you going to paste the text to?

That said making the description copyable is straight forward if placed in a QLineEdit or QPlainTextEdit set as ReadOnly … the name text - not so much. The name text is contained in a QTableWidgetItem and a bit harder to deal with.

2 Likes

What vesion are you using? I already added the description column to custom variables. I can easily “un-hide” the description column for measurements:

And add a QTableWidgetItem for the measurement description data. What I would do is also add the description text as a rollover tooltip so you could see any long descriptions that are likely to get elided, as I would not want to set the cell to word wrap as the priority of the fx editor is to see & select the measurement by name - not reading descriptions .

3 Likes

Hmmm… I’m stumped at the momment. I supposedly had already implemented showing the description for measurements along with the custom variables, where the description would be displayed in the box like below:

For some reason when loading the measurements through Seamly2D the descriptions for measurements are getting lost and just end up an empty string. :thinking:

2 Likes

I’ve found the reason for the missing descriptions in the fx editor… ME is NOT writing the known measurement descriptions to the ME file, so when 2D loads an ME file the descriptions are empty.

When ME loads a measurement file it gets the (fixed) descriptions from the hardcoded text in the measurement database.

On the other hand… ME does write Custom measurement descriptions:

image

2 Likes

Is there a way to make ME records the descriptions, too?

1 Like

Yes. That’s what I think is the better solution, rather than trying to jump through hoops getting access to the known measurements database on the 2D side.

There’s only 1 slight issue with this way in that you would have to open the ME file, and save as the same file name to force it to write the known descriptions to have the descriptions then available elsewhere… like the fx editor.

This is just another example of what frustrates me at times with how RT coded the apps. He often lacked seeing the bigger picture and wrote (spaghettti) code that handles data for one specific purpose. For ex… In this case he assumed because you can’t edit the known measurement descriptions there is no need to write them to the ME file - just display them in the ME main window, and in the process made the class structure of a measurement variable more convoluted… which is why it took me some time to unravel what’s going on. It’s also another example of why IMO the separation of 2D & ME as sepearate apps complicates the sharing of data between the 2. :roll_eyes:

1 Like

I’m just afraid that if we join the 2 too soon, It may break the ability to use 1 ME file in more than 1 pattern. But you said that it wouldn’t affect that, so perhaps one should check it out.

1 Like

Would have no effect… as it is SeamlyMe does not open everytime you load a pattern and ME file.

To put the two apps together as one would take a lot of refactoring. There’s more important features to address. I just brought it up as in this case it’s just another barrier to have to deal with.

2 Likes

Yay!.. I figured it out.

Just have to resize the columns better, and I’ll have to see if I can make them copyable in the lower text box.

Note… that the way ME is writing the measurement descriptions it is not feasible to write the known descriptions to the file, but I did figure out how to access them in Seamly2D. :slightly_smiling_face:

3 Likes

Aaaahhhh, I knew you’d find a way :partying_face: :woman_dancing:

Well done!!!

2 Likes

While I was at it I added the “Full Name” field. :slight_smile:

image

And now the columns are sized better:

And for @DavidDeb:

You will be able to copy the text in the label box. It’s not a QPlainTextEdit as I thought so the setReadOnly does not apply, but with a Qlabel you can set it to interact with the mouse to copy.

3 Likes

Wow! very nice, @Douglas

Thank you very much. :hugs:

1 Like

I submitted a PR for the updates for the measurement “info” (descriptions and full name). Might make this weekend’s release, if not the next.

Now… back to my regularly scheduled feature. :slight_smile:

3 Likes

Update: Thanks to @Sue the PR is merged and will be in this sun / mon release. :slight_smile:

2 Likes

Hi,

Copyable for the reason that I could copy my formula ‘template’ out and simply paste this into the recipient ‘Edit Formula’ TextBox ….

2 Likes