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.
Select Configuration States using the URL?
owen_sparks
Member, Developers Posts: 2,660 PRO
in General
Hi all.
Please forgive me if this has been discussed elsewhere.
I was wondering is it, or will it be, possible to select a PartStudio Configuration via its URL?
Example:-
Here I have a dummy part with a pair of configurations.
What I'd like to be able to do is have a non cad user be able to open a configuration directly from a hyperlink along these lines:-
Background:-
I'm changing roles within my company and will no longer be designing stuff. Instead I'm building some software to handle the thousands of possible configurations our products can be ordered in. This will allow our sales team to see what it is they're asking for and for our purchasing and production departments to understand what has been sold...
Long term this might end up as a web portal using the Onshape API to return configurations, but shorter term it'll be a desktop application. An easy win from my point of view would be for my system to build a string for the configured part/assembly and spit it to a web browser.
Thanks all,
Owen S.
Please forgive me if this has been discussed elsewhere.
I was wondering is it, or will it be, possible to select a PartStudio Configuration via its URL?
Example:-
Here I have a dummy part with a pair of configurations.
What I'd like to be able to do is have a non cad user be able to open a configuration directly from a hyperlink along these lines:-
cad.onshape.com/documents/12345/w/678910/&HoleQty3&BracketWidthLarge
Background:-
I'm changing roles within my company and will no longer be designing stuff. Instead I'm building some software to handle the thousands of possible configurations our products can be ordered in. This will allow our sales team to see what it is they're asking for and for our purchasing and production departments to understand what has been sold...
Long term this might end up as a web portal using the Onshape API to return configurations, but shorter term it'll be a desktop application. An easy win from my point of view would be for my system to build a string for the configured part/assembly and spit it to a web browser.
Thanks all,
Owen S.
Business Systems and Configuration Controller
HWM-Water Ltd
HWM-Water Ltd
0
Comments
HWM-Water Ltd
This adds the config parameters to the url.
Onshape, Inc.
HWM-Water Ltd
HWM-Water Ltd
Owen S.
HWM-Water Ltd
HWM-Water Ltd
I suppose you are feeding configurations manually into your application? Would be awesome to fetch the list from Onshape..
I'm pretty much in same position 'code wise' as you - I can create local/web database applications but don't have enough time to dive into API even though I would like to..
Currently I'm working with partstudios not assemblies (because featurescript, and I like PS configs). Composite parts look really interesting and so very nearly do what I need but I'm not quite there yet, or they're not, can't tell which yet!
More to come.
Owen S.
HWM-Water Ltd
HWM-Water Ltd
Would you be able to use Microsoft's WebView2 control that uses Edge Chromium?
https://docs.microsoft.com/en-us/microsoft-edge/hosting/webview2
EDIT: Added URL
IR for AS/NZS 1100
HWM-Water Ltd
There's an open-source "configurator" application here:
https://github.com/onshape-public/configurator-example
It includes a viewer in the browser (that could be embedded in a website) and a server component that communicates with Onshape to extract the configuration parameters.
There is a running demo of this here:
https://configurator.cae.tech
This was designed for the use-case you suggest - so manufacturers can allow customers to configure products from their website and link to ordering/production. The app even allows configured drawing elements to be downloaded as PDF or the configured assembly to be exported to different CAD formats.
Thanks
Pete
HWM-Water Ltd
good job on your configurator, nicely done
Big deal?
So Bill and I were working together on the idea of a web based configurator and came up with this about a year ago. It's still running. He shared a document with rustyshed that had configurations defined and I parsed the configuration tables into html, displayed on a website and allowed web based changes to his part.
All that was required was for him to share the document with me and in return it gave the world access to his configured document. He could change the document at any time and then the world would have more options.
https://rustyshed.com/?route=circuitCase
I think Owen is looking for url configuration endpoints.
All the options under the sun will require access to a web server and a little code. harmanpa did a great job. I'm waiting for the API access call to gltf for the display list information. Currently you have to convert STL data over to webgl which is more work than necessary. harmanpa how did you do it?
You can manually export gltf and then paste it into some code, but I'm waiting until I can download it through the API. Maybe it's possible now. I haven't ckecked lately.
It is however now possible to export GLTF via the API, it requires calling the createTranslation method (which is asynchronous).
Is GLTF the way to go? A year ago I was working on a webgl interface and read about GLTF at the khronos group. That's when I put a ticket in to get GLTF inside OS.
With STL you don't get materials or colors; do you keep track of color, material & STL for each part? It's a lot of work to get STL working.
I've downloaded your example; thanks for putting it together.
Does GLTF offer up anything better?. Could you send the whole assembly and it'd render properly? Would it render like it does in OS?
Here's the trail of methods available for translating an element type assembly:
Get Element Translator Formats
Here's the translation name GLTF listed in the returned "Body"; make sure it's capitalized.
Create Assembly translation
All looks good, look at the returned "Body"
Goto the async callback location
Says there's an error.
Change it to translate STEP
So I can translate a STEP but not a GLTF.
I think I'll go back into hibernation until they clean this API up and support it better.