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.

Error: Custom Bearing did not regenerate properly

Ryan_BaoRyan_Bao Member Posts: 2

Hi all, I'm working on a tool that will allow me to make custom 3d printed bearings and insert them in part studios, and I'm attempting to script this in featurescript. However, I'm having trouble with inserting the part in a new part studio at a mate connector that I select. It gives me the error "Error Regenerating." When I remove the transform function, it generates correctly.

The link to the document is here: https://cad.onshape.com/documents/6c4fccc86d703eea50e28060/w/10de22df112ea139f5ee401c/e/17c1e802a8092ac3d37bcec4?renderMode=0&uiState=66db2f66aea0e80f1737e361.

Any help would be appreciated. Thanks!

Comments

  • Caden_ArmstrongCaden_Armstrong Member Posts: 173 PRO

    If you read the error, you'll see that your query resolves to nothing

    qCreatedBy(id + "addThing", EntityType.BODY)

    Your feature has no operation with that id.

    If you are going to import geometry with a featurescript, you're better off with an instantiator rather than merge contexts.
    https://cad.onshape.com/FsDoc/library.html#module-instantiator.fs

    If you are interested, I have a short blog article with some tips for debugging featurescript.

    www.smartbenchsoftware.com --- fs.place --- Renaissance
    Custom FeatureScript and Onshape Integrated Applications
Sign In or Register to comment.