qEdgeVertex suddenly missing – related to default libraryVersion?

he_qiu143
he_qiu143 Member Posts: 10 ✭

Hi everyone,

I'm running into a frustrating issue with FeatureScript inserted via the Onshape API (from a Python-based workflow).

图片.png

Recently, my script started failing with an error saying the qEdgeVertex function is undefined. After some investigation, I found that the root cause seems to be the libraryVersion — it's being set to 1511, which is too old to include qEdgeVertex.

What’s strange is:

  • In the past, I never explicitly set libraryVersion, yet the script worked fine — newer functions like qEdgeVertex were available.
  • Now, even if I manually set libraryVersion to 2581 in the body of the API request, the actual request (or the resulting FeatureStudio document) still shows libraryVersion: 1511.
  • The issue resolves only when I manually edit the FeatureScript in the Onshape UI and bump the library version there.

My questions are:

  1. Has Onshape recently changed how libraryVersion is handled or defaulted via the API?
  2. Why does manually setting libraryVersion in the request body have no effect?
  3. Is there a way to force the correct libraryVersion via the API?

Thanks in advance for any help — I'd really appreciate clarification or suggestions from anyone who’s run into similar behavior.

Answers

  • he_qiu143
    he_qiu143 Member Posts: 10 ✭

    I did some further testing and found something interesting.When I created a brand-new Part Studio and inserted the same FeatureScript via the API, the libraryVersion was correctly set to 2681, and everything worked as expected. However, the original Part Studio — where libraryVersion was stuck at 1511 — was created by copying a public document.This leads me to suspect that the issue might be related to the source document's version. Perhaps the public document I copied was originally created with libraryVersion: 1511, and that version is somehow being inherited or locked in for all derived Part Studios?If that’s the case, is there any way to upgrade or override the libraryVersion on a Part Studio that was copied from an older public document?Any thoughts or confirmations would be greatly appreciated — this could explain a lot of confusion for others working with public templates too.