Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. 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.

Can Featurescript pull data from Google Docs?

christopher_quijanochristopher_quijano OS Professional Posts: 41 PRO
I used to have a VB program in Solidworks that would popup a dialog window. In that window I would use a dropdown box to pick the Project name, and a commodity type and then the program would create a prefix and then pull a sequential number from an Access database to create the part number.

Is it possible to go something like this using Featurescript? I would like to pull the sequential number from a Googles Docs spreadsheet file and then populate the part level Part Number attribute.

So far I have only seen examples of controlling the flow of data through Docs like the Google BOM addon. 




  • lemon1324lemon1324 Member, Developers Posts: 182 EDU
    FeatureScript can read in blob data and do string parsing, so if uploading a CSV to your document is an acceptable workaround, you could write a script to then read from that.  Similar code is in the airfoil profile scripts, I think.

    If you want to directly interface a Google Doc from FS, then no.  FS runs tightly sandboxed and can only access things in the immediate context.
    Arul Suresh
    PhD, Mechanical Engineering, Stanford University
  • philip_thomasphilip_thomas Member, Moderator, Onshape Employees, Developers Posts: 1,381

    Philip Thomas - Onshape
  • billy2billy2 Member, OS Professional, Mentor, Developers, User Group Leader Posts: 1,478 PRO
    edited March 2018
    I think you'd be better off reading about the API in onshape. Lou has an example written in python that talks to google docs. Python isn't a requirement as the API works with json so any language will work. It's best to choose a language that has a json library so you don't have to write a parser for handling json.

    Your question is more of an internet thing than an OS thing. To perform this you'll be needing a server and some other minor things. It's not that hard to setup. You can even use a hosted account for simple traffic. You will need SSL which is the most difficult part of this journey but you can get it for free these days and setting it up by reading a few online articles.

    Then from your server, you start talking to OS & google exchanging data. This is the basic premise on the cloud with servers talking to servers. This is going to change everything. It's a good thing to get started doing, it ain't going away.

Sign In or Register to comment.