Digital Swatches
Digital Swatches are small thumbnails of finishes that can be placed and manipulated by the user.
How to implement in your Extension
The Digital Swatch is a Snapper that contains a Material and can be manipulated by the user. The idea is to be able to visualize the finish in the 2D view.
The Digital Swatches code resides in its own extension and package:
Add this line in your package file:
use cm.abstract.tools.digitalSwatch;
Add this line to your Extension Creation:
info.putExtensionDependency(#"cm.abstract.tools.digitalSwatch");
To spawn a Digital Swatch use the following code:
Snapper s = DigitalSwatch(m); // m is the Material to be shown s.setPos(pos); // pos is the position you want the swatch to end up in Space coordinates. space.undoableInsert(s); // inserts the DigitalSwatch object into Space.
How the UI for the Digital Swatches are handled are up to each Extension Owner. This may include tying it to a finish legend or in some other way collect used finishes in the drawing to populate an area with Digital Swatches.
Comments
0 comments
Please sign in to leave a comment.