CAM PropertyBag

CAM PropertyBag

Menu location

CAM  Utils  Property Bag

Workbenches

CAM

Default shortcut

None

Introduced in version

0.19

See also

Expressions

Description

The CAM PropertyBag command (tooltip: Creates an object which can be used to store reference properties) creates a Property Bag object: a container for user-defined, typed properties that other objects (e.g. Operations or the Setup Sheet) can reference in expressions.

Usage

  1. Optionally select a PartDesign Body (or a feature inside one); the Property Bag is then added to that Body with the label Attributes.

  2. Select CAM  Utils  Property Bag (there is no toolbar button or keyboard shortcut).

  3. Double-click the Property Bag in the Tree View to open its task panel and add properties.

Task panel

The Property Bag panel lists the custom properties (name, group, value).

  • Add opens the Create Property dialog with:

    • Name: letters, digits and underscores only; MixedCase names are displayed with spaces.

    • Group: category shown in the property editor; existing groups are offered.

    • Type: Angle, Bool, Distance, Enumeration, File, Float, Integer, Length, Percent, String.

    • Enums: comma-separated values, for the Enumeration type.

    • ToolTip

    • Create another: keep the dialog open to add several properties in a row.

  • Modify edits the selected property’s value.

  • Remove deletes the selected property.

Properties

  • CustomPropertyGroups (Enumeration): list of the custom property groups in the bag.

All user-created properties appear under their own group and can be referenced as PropertyBag.MyValue in expressions.

Scripting

import Path.Base.PropertyBag as PropertyBag
bag = PropertyBag.Create('PropertyBag')
bag.Proxy.addCustomProperty('App::PropertyLength', 'StockTop', 'Stock', 'Top of stock')
bag.StockTop = 25
op.setExpression('StartDepth', 'PropertyBag.StockTop')