import features script from other public document

gilles_horté
gilles_horté Member Posts: 1 ✭
edited December 2018 in FeatureScript
hello , 
i try to create a rack and a pinion faeture script. 

the script to create spur gear already exists thanks to @NeilCooke and i want to reuse it in my own script  by using the import capability of Feature Script
https://cad.onshape.com/FsDoc/top-level.html

but i have some warning on Feature studio from the import line code  (spur gear feature is https://cad.onshape.com/documents/5742c8cde4b06c68b362d748/v/16a222adf3cb9a3b33ed9536/e/01a666571e625f8b819fd75b)
import(path : "5742c8cde4b06c68b362d748/16a222adf3cb9a3b33ed9536/01a666571e625f8b819fd75b", version : "2.0");

i don't know if importing plublic script is avaible or if my usage of import is wrong, someone already use a feature script into on other feature script ( other than onshape/std/....fs)

how can we know the version ID ? 

 

Comments

  • ilya_baran
    ilya_baran Onshape Employees, Developers, HDM Posts: 1,279 image
    I recommend using the import button in the feature studio and selecting the document/version/element to import.  The id that goes into the "version" part of the import is not that easy to get otherwise.
    Ilya Baran \ VP, Architecture and FeatureScript \ Onshape Inc