News:

BB code in posts seems to be working again!
I haven't turned on every single tag, so please let me know if there are any that are used/needed but not activated.

Main Menu

Change number from measurement to just a decimal number

Started by Mouthpear, September 02, 2022, 03:33:57 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Mouthpear

How do you change a number that is a measurement in to a regular number.


How it comes out
Sheet.1!Width = 50.000 mm 

What is needed.
Sheet.1!Width = 50.000

Surrogate

Where you need watch these numbers:

  • Size & position window
  • Shape's field

hidden layer

It looks like a shapesheet's cell (Width)
This is already a number - it just looks like no number but it is.

If you have a look at the field LocPinX you can see that there's already a formula in it which uses the value of Width (if you take a simple rectangle).

For other cells you can check if these are numbers (to calculate with):

1. insert  the section "user defined cells" or a new line in it
2. insert the formula: (the cell you want to calculate with) * 2
3. If the calculation is correct, it's easy
4. If not you have to separate the "numbers" (mid(...)) *1 in order to have NUMBERS.

cheers
hl

Surrogate

Quote from: hidden layer on September 02, 2022, 08:22:16 AM
4. If not you have to separate the "numbers" (mid(...)) *1 in order to have NUMBERS
IMHO best way use formulas like
Quote=width/1 mm

Mouthpear

Quote from: Surrogate on September 02, 2022, 04:08:40 AM
Where you need watch these numbers:

  • Size & position window
  • Shape's field

My apologies to you both. I was not informed that a response had been made.

Thank you for your replies.

I ended up using

FORMAT(Width,"00.00")





Browser ID: smf (is_webkit)
Templates: 4: index (default), Display (default), GenericControls (default), GenericControls (default).
Sub templates: 6: init, html_above, body_above, main, body_below, html_below.
Language files: 4: index+Modifications.english (default), Post.english (default), Editor.english (default), Drafts.english (default).
Style sheets: 4: index.css, attachments.css, jquery.sceditor.css, responsive.css.
Hooks called: 233 (show)
Files included: 34 - 1306KB. (show)
Memory used: 1106KB.
Tokens: post-login.
Cache hits: 13: 0.00120s for 26,766 bytes (show)
Cache misses: 2: (show)
Queries used: 17.

[Show Queries]