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.
Why importing from other onshape docs convert from mm to inches?
pieri70
Member Posts: 10 ✭✭
Hello
I'm beginning to use OS
I was attempting to copy a public document and then make some mods.
Until today all went fine.
Then I cancelled by mistake a piece and tried to copy another one from a public document.
My problem is that when I copy the part studio to clipbord an then paste in My document by import function, the part studio is converted to inches...
In my preferences I set mm/deg/gram under preferences.
If I examine the code of my previous parts I can see:
*******************************
Once I import it the code changes to:
********************
I'm beginning to use OS
I was attempting to copy a public document and then make some mods.
Until today all went fine.
Then I cancelled by mistake a piece and tried to copy another one from a public document.
My problem is that when I copy the part studio to clipbord an then paste in My document by import function, the part studio is converted to inches...
In my preferences I set mm/deg/gram under preferences.
If I examine the code of my previous parts I can see:
*******************************
FeatureScript 370;
import(path : "onshape/std/geometry.fs", version : "370.0");
annotation { "Default Units" : ["degree", "millimeter", "pound"] }
export function main()
{
return build();
}
export function build()
{
const context is Context = newContextWithDefaults(millimeter);
**************************
The part to import code is:
***************************
**************************
The part to import code is:
***************************
FeatureScript 370;
import(path : "onshape/std/geometry.fs", version : "370.0");
annotation { "Default Units" : ["degree", "millimeter", "pound"] }
export function main()
{
return build();
}
export function build()
{
const context is Context = newContextWithDefaults(millimeter);
const id is Id = newId();
*****************
*****************
Once I import it the code changes to:
********************
FeatureScript 370;
import(path : "onshape/std/geometry.fs", version : "370.0");
annotation { "Default Units" : ["degree", "inch", "pound"] }
export function main()
{
return build();
}
export function build()
{
const context is Context = newContextWithDefaults(inch);
************************
Why?????
Then
My document was 80MB, I eliminate almost everything unnecessary and it is as big as it was.
As I eliminate things the dimension rises...
Why???
Thanks
Pietro
************************
Why?????
Then
My document was 80MB, I eliminate almost everything unnecessary and it is as big as it was.
As I eliminate things the dimension rises...
Why???
Thanks
Pietro
0
Comments
it was the document units...
But I'm almost sure I didn't change them...
But my document was a private copy of a document found in Onshape, and it was originally in millimeters...
And I was making mods in millimeters for a period..
Then at some point OS decided, by itself, that some pieces imported were in inches..
And all new Part Studios had to be in inches..
For the dimension problem..
I copied/pasted all pieces in a new document and magically the new document went from 80MB to 12MB.