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.
Variable WORLD_ORIGIN not found Variable Z_DIRECTION not found
Fda
Member Posts: 42 ✭✭
Why is the code broken?
I do not get it
const lineToRotateAround = line(WORLD_ORIGIN, Z_DIRECTION); //????????? const angleIncrement = (360 * degree) / MyCount; var transforms = []; var instanceNames = []; //definition.count -> MyCount for (var i = 1; i < MyCount; i += 1) // Iterar de 1 -> (definition.count - 1) porque ya hemos creado la instancia base (0) { const currAngle = i * angleIncrement; const currTransform = rotationAround(lineToRotateAround, i * angleIncrement); // Añadir currTransform a la lista de transformaciones transforms = append(transforms, currTransform); // los nombres de instancia no importan, solo deben ser cadenas únicas instanceNames = append(instanceNames, toString(i)); }
Tagged:
0
Comments
These are fairly new constants in the system, your feature studio may be on too old of a version to have them. Can you post a screenshot of the very top of your feature? I am interested in the line that says "FeatureScript ####;" and all the imports that come after that.
If you have an import of "onshape/std/geometry.fs" and the FS version is high enough, those constants should exist.
This fixes the error: