Digital Swatches
Digital Swatches are small thumbnails of finishes that can be placed and manipulated by the user.
How to Implement in Your Extension
A DigitalSwatch
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 DigitalSwatch
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 DigitalSwatch 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
1 comment
Refer to this article to add Swatches: Resource Directories – Configura Help Center
Please sign in to leave a comment.