Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- Be respectful, on topic and if you see a problem, Flag it.
If you would like to contact our Community Manager personally, feel free to send a private message or an email.
I there a way to set formatting in custom properties
I'm looking for a way to set formatting in a custom property.
Property is 'double' and I would like to fix number of decimal places.
Currently all I see is the last whole significant digit in BOM.
ie. 1.00 entered shows as 1 - .50 shows as .5 - 10.00 as 10
Since there is an implied tolerance with 2 decimals and for clarity of reading I'd like to see the whole number to 2 decimals.
This transfers out to CVS file as well and needs correcting in spread sheet.
Property is 'double' and I would like to fix number of decimal places.
Currently all I see is the last whole significant digit in BOM.
ie. 1.00 entered shows as 1 - .50 shows as .5 - 10.00 as 10
Since there is an implied tolerance with 2 decimals and for clarity of reading I'd like to see the whole number to 2 decimals.
This transfers out to CVS file as well and needs correcting in spread sheet.
0
Best Answers
-
john_mcclary Member, Developers Posts: 3,936 PROI usually set all properties as text, there is no math you can do on them, so no real reason I have ever need them to be actual numbers.
On export, you may find some programs like excel will still truncate the trailing zeros by default, even if you have it set correct in Onshape, or SW etc.
also some numbers may appear as dates in excel, like 3/8-16 for a bolt likes to come in as 3/08/16. Adding an inch(") symbol or some non numerical character can force excel to import that cell as plain text. Which can help you keep your trailing zeros as well.
Otherwise, I do not think there is any way to set leading/trailing zeros in custom properties. You may need to create an Improvement Request5 -
Prachi Member, OS Professional Posts: 262 ✭✭✭Thanks John
That's the experience I've had. Excel is rounding as though it's numbers and truncating both leading and trailing zeros even if it's text.
Tried adding a dash in front but stull gets truncated.0 -
owen_sparks Member, Developers Posts: 2,660 PROStill easier to source than "31-Feb's"Business Systems and Configuration Controller
HWM-Water Ltd7
Answers
On export, you may find some programs like excel will still truncate the trailing zeros by default, even if you have it set correct in Onshape, or SW etc.
also some numbers may appear as dates in excel, like 3/8-16 for a bolt likes to come in as 3/08/16. Adding an inch(") symbol or some non numerical character can force excel to import that cell as plain text. Which can help you keep your trailing zeros as well.
Otherwise, I do not think there is any way to set leading/trailing zeros in custom properties. You may need to create an Improvement Request
That's the experience I've had. Excel is rounding as though it's numbers and truncating both leading and trailing zeros even if it's text.
Tried adding a dash in front but stull gets truncated.
I wonder how long it would take to get some 8-Jan hex nuts...
HWM-Water Ltd