How to import a function from one document into another?

dave_cowden
dave_cowden Member, Developers Posts: 484 ✭✭✭
I am trying to import an FS function from one tab in one document into another one.

The syntax to import a function between tabs in the same document looks like:
export import ( path: "e0116d57a4eba0bd041f3bc5", version : "00769121c72860815989f6c6" );

to import a tab that looks like this

      https://cad.onshape.com/documents/577133d6e4b0263ce22dc025/w/992fac31cd40fac5989e2a4/e/e0116d57a4eba0bd041f3bc 

But what is the format to import this same tab from another document? I tried just about all of the permutations, and none seem to work:

export import ( path: "e0116d57a4eba0bd041f3bc5", version : "00769121c72860815989f6c6" );
export import ( path: "577133d6e4b0263ce22dc025/e0116d57a4eba0bd041f3bc5", version : "00769121c72860815989f6c6" );
export import ( path: "577133d6e4b0263ce22dc025/992fac31cd40fac5989e2a4/e0116d57a4eba0bd041f3bc5", version : "00769121c72860815989f6c6" );

What am I missing? I was thinking the path format was user/document/tab, but that maybe i'm picking the wrong numbers? Or maybe you just cannot import functions between documents?

Best Answer

Answers

  • dave_cowden
    dave_cowden Member, Developers Posts: 484 ✭✭✭
    awesome, thank you for the answer! I didn't even notice the 'real' import feature now!