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.

Milk Crate FeatureScript Fundamentals Error

Rhett_RobinsonRhett_Robinson Member Posts: 130 PRO

Today I was working through the Advanced Topics / Exercise: Milk Crate Capstone Project and I ran into an error I have been unable to solve.

On Slide 12 of the tutorial it says to commit and test the feature, where you will be able to view the lattice in its correct position. I didn't receive an error, but the part never showed up. I went back through the slides and when I didn't find anything a skipped ahead to see if it would by some chance be resolved. Slide 14 says that there should be an error with the boolean, but my error rather stated the precondition had failed.

As far as I can tell and a quick use of AI confirmed, the code I have is identical to the completed code provided at the end of the exercise with the exception of my personal notes and the FeatureScript versions being different (example is 1717 and my code is at 2522). I tried changing the completed code example to version 2522 and the same error popped up there. Has something drastically changed since this tutorial was made that I am missing?

On a related note, is importDerived the best/only way to reference another part studio in FS? I have also seen the instantiate function but haven't found much about it.

Any help is appreciated!

My document: Milk Crate FS

Comments

  • Caden_ArmstrongCaden_Armstrong Member Posts: 194 PRO
    edited December 6

    The importDerived feature has changed, you just need to add "newUI":false to your usage of importDerived.

    You can read about instantiation here: https://cad.onshape.com/FsDoc/imports.html
    If you are doing lots of imports, it will give better performance than using the entire importDerived feature. But the importDerived also does more than just the instantiate does (context merging, variables, sheet metal, etc), so theres pros-cons to each.

    www.smartbenchsoftware.com --- fs.place --- Renaissance
    Custom FeatureScript and Onshape Integrated Applications
  • Rhett_RobinsonRhett_Robinson Member Posts: 130 PRO

    Nice, that did the trick!

    Thanks for the link to instantiation, I will read up on that and play with the differences between the two.

  • paul_nesbitt130paul_nesbitt130 Member Posts: 2

    Thank you, both! I was hours in. This was such a relief.

Sign In or Register to comment.