CAMFolder Object

Derived from: OperationBase Object
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMFolder.h>

Description

Object that represents a folder in an existing Setup, Folder or Pattern.

Methods

Name Description
activate Sets this object as the default container.
classType Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createFromCAMTemplate **RETIRED** Creates and adds operations, folders or patterns from the specified CAMTemplate to the end of this folder.
createFromCAMTemplate2 Create new operations, folders, or patterns from the specified CAMTemplate. They are added to the end of the parent setup.
createFromTemplate **RETIRED** Creates and adds operations, folders or patterns from the specified template file to the end of this folder.
createFromTemplateXML **RETIRED** Creates and adds operations, folders or patterns from the specified template content XML to the end of this folder.
deleteMe PreviewDeletes the operation from the document. In case of a setup or folder, all containing child operations will be deleted as well.
modifyUtility PreviewGet ModifyUtility for the current operation by given utility type.

Properties

Name Description
allOperations Gets a collection containing all of the operations in this folder. This includes all operations nested in folders and patterns.
attributes Returns the collection of attributes associated with this object.
children Returns a collection containing all of the immediate (top level) child operations, folders and patterns in this folder in the order they appear in the browser.
error Returns a message corresponding to any active error associated with the value of this parameter.
folders Returns the Folders collection that provides access to existing folders in this folder.
generatedDataCollection PreviewGet the generated data associated with a given operation base instance. The type of data depends on the strategy type and might not be available for all strategy types. The available types can be found in GeneratedData.cs
hasError Gets if errors were encountered when generating the operation.
hasWarning Gets if problems were encountered when generating the operation.
isActive Gets if this folder is active.
isLightBulbOn PreviewGets if this operation is currently visible in the graphics window. Use the isLightBulbOn to change if the eye icon beside the operation node in the browser is on or not. Parent nodes in the browser can have their light bulb off which affects all of their children so this property does not indicate if the operation is actually visible, just that it should be visible if all of its parent nodes are also visible. Use the isVisible property to determine if it's actually visible.
isOptional Gets and sets the "Optional" property value of the operation. Gets/sets true if the operation is optional.
isProtected Gets and sets the "protected" property value of the operation. Gets/sets true if the operation is protected.
isSelected Gets if this operation is selected in the 'Setups' browser.
isSuppressed Gets and sets the "Suppressed" property value of the operation. Gets/sets true if the operation is suppressed.
isValid Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isVisible PreviewGets if this operation is currently visible in the graphics window. Use the isLightBulbOn to change if the eye icon beside the operation node in the browser is on or not. Parent nodes in the browser can have their light bulb off which affects all of their children. This property indicates the final result and whether this operation is actually visible or not.
name Gets and sets the name of the operation as seen in the browser. This name is unique as compared to the names of all other operations in the document.
notes Gets and sets the notes of the operation.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
operationId Returns the id of the operation. This id is unique as compared to the ids of all other operations in the document. This id will not change when changing the order or parent of the operation. This id will remain valid when the document is saved and reloaded.
operations Returns the Operations collection that provides access to existing individual operations in this folder.
parameters Gets the CAMParameters collection for this operation.
parent Returns the parent Setup, Folder or Pattern for this Folder.
parentSetup Gets the Setup this operation belongs to.
patterns Returns the Patterns collection that provides access to existing patterns in this folder.
strategy Gets the name of the strategy associated with this operation.
warning Returns a message corresponding to any active warning associated with the value of this parameter.

Accessed From

CAMFolders.addFolder, CAMFolders.item, CAMFolders.itemByName, CAMFolders.itemByOperationId

Derived Classes

CAMPattern

Samples

Name Description
Manufacturing Workflow API Sample Manufacturing Workflow API Sample

This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version January 2016