Top 2024 Onshape FeatureScript and API Enhancements
2024
FeatureScript Performance Improvements
The updates focused on improving the performance of FeatureScript are among the most significant enhancements. These improvements include the optimization of library calls and vector math performance using a recursive evaluator, which will substantially reduce computational overhead and execution time. This is particularly crucial for complex scripts that handle extensive data or require frequent evaluations, ensuring smoother and faster user experiences.
Additionally, the support for fast evaluation of operators like += and *= for the recursive evaluator will simplify scripting and reduce the time complexity of operations. These enhancements streamline code execution, making scripts more efficient and responsive.
Evaluation Efficiency
The new query for objects on one side of a plane (qInFrontOfPlane) is a powerful addition that enhances geometric queries’ precision and performance. This function is essential for features requiring spatial analysis and precise object selection.
The addition of the undefined-coalescing operator (??) and the string join() function further enriches the scripting capabilities by providing more robust handling of null or undefined values and simplifying string operations. These items improve code readability and maintainability, making feature studios more intuitive and less error-prone.
API Enhancements
The API updates aimed at supporting public and anonymous share endpoints and simplifying the features endpoint to require fewer parameters are notable improvements. These changes facilitate easier integration and interaction with Onshape from external applications, broadening the scope of automation and customization possibilities for users.
The inclusion of detailed attributes like isDangling in export JSON and additional parameters for GET endpoints enhances the granularity and utility of data retrieved through the API. These enhancements provide developers with more control and information, enabling more sophisticated and accurate application development.
See the following change log summaries for Onshape’s FeatureScript and Rest API:
FeatureScript Change Log Summary 2024
See Onshape’s general change log here: https://www.onshape.com/en/changelog/
- Improve performance of library calls: evaluate.fs
- Add a string join() function
- New BLOB import text file (*.txt)
- Improve vector math performance using recursive evaluator
- Add undefined-coalescing operator (??)
- Allow inequality comparisons for enum values (>, <=, and >=)
- Support fast evaluation of operators like += and *= for the recursive evaluator
- New query for objects on one side of a plane: qInFrontOfPlane
- New function getAllAttributes as a map of all attributes for an entity
- Add text reference parameter (text files as a string)
- Improve evFaceTangentPlanes with new parameter returnUndefinedOutsideFace
- Add nest parameter groups for feature precondition (limit 5)
- Improve performance for processing derived part studios
- Refactor opSplitPart and opDraft to accept Plane
- Allow cylinder selection for opSplitPart
- Add an option for opEnclose to keep redundant edges
API Change Log Summary 2024
See Onshape’s API change log here: https://onshape-public.github.io/docs/changelog/
- Support public and anonymous share endpoints
- Add ‘isDangling’ field to the export JSON in Drawings API
- Add Assembly GET endpoint for Display states
- Increase allowed size for POST to featurestudio endpoint
- New parameter for Part Studio GET endpoint for sketches for full defined status (V7)
- Simplify the features endpoint to require fewer parameters
- Return variable description in GET variables endpoint when variable is set through custom feature
- Add microversion (mv) to response for app extensions endpoint
- Support for export of tables in JSON
- New Drawings sample application public repo
- Improved location of drawing notes when placing using Drawing API
- Improve FSTable API documentation
- Fixed issues preventing usage of Publication APIs including delete endpoint
- Fixed Mass properties API to account for overridden masses in a version
What’s New In the 2025 SOLIDWORKS API
This article covers notable enhancements to the 2025 SOLIDWORKS API, 2025 SOLIDWORKS PDM API, and 2025 SOLIDWORKS Document Manager API.
SOLIDWORKS API
- Texture Mapping Enhancements: Support for non-linear texture mapping types, including surface projections, has been introduced. This is accessible via the IFace2::GetTessTriStripTextures and IPartDoc::GetTessTriStripTextures interfaces, which allow for more flexible and detailed surface textures.
- Scene Customization: New methods in the ISwScene interface, such as AddOrEditFloorAppearance and GetFloorAppearance, give developers more control over the appearance of floor elements in model scenes. This adds a higher level of visual customization to scene rendering.
- Improved Drawing Annotations: The IView::ImportAnnotations method now allows users to import annotations directly into drawings. This can streamline workflows by reducing the need for manual annotation entry and enhancing consistency across projects.
- Performance Optimizations: Performance has been improved when reloading SOLIDWORKS models from disk. With the IModelDocExtension::ReloadWithReferences method, only selected references are reloaded, leading to faster file handling in complex assemblies.
- New Material Properties: Updates to the IRenderMaterial interface introduce several new properties, such as BumpStrength, which replaces the older BumpAmplitude, and additional controls for surface finishes and knurling features. This provides more granular control over material textures and visual effects.
- Obsolete Methods: Some older methods have been deprecated. For instance, IView::InsertBomTable5 has been replaced by InsertBomTable6, and certain bump map properties in the IRenderMaterial interface have been superseded by more modern equivalents.
These updates will give developers more precise control over textures, materials, and performance, enhancing both the aesthetic quality and efficiency of working with the SOLIDWORKS API.
For more detailed information, you can refer to the SOLIDWORKS API 2025 Release Notes.
SOLIDWORKS PDM API
- New interfaces
SOLIDWORKS DOCUMENT MANAGER API
- No new notable enhancements.
Does anything we’ve covered stand out to you as particularly useful or exciting? If so then let us know in the comments!
Want to keep up with future CADSharp.com content and training events? Join our newsletter!
Onshape hidden tips and tricks
Onshape hidden tips and tricks.
ㅤ
Here is a list of useful Onshape tips that you may not know about: