WorkSurfaceCollection
A collection of work surfaces in the model.
Example
app = cf.GetApplication() project = app:NewProject() cylinder = project.Geometry:AddCylinder(cf.Cylinder.GetDefaultProperties()) -- Add work surfaces around the cylinder at three intervals project.WorkSurfaces:Add(cylinder.Faces["Face3"], 0) project.WorkSurfaces:Add(cylinder.Faces["Face3"], 0.5) project.WorkSurfaces:Add(cylinder.Faces["Face3"], 1) -- Remove the first work surface from the collection of work surfaces project.WorkSurfaces[1]:Delete()
Usage locations (collections)
The following objects contain the WorkSurfaceCollection collection:
Property List
Method List
- Add (referenceface Face, offset Expression)
- Create a work surface referencing the given face with the given offset. (Returns a WorkSurface object.)
- Add (label string, referenceface Face, offset Expression)
- Create a work surface with the specified label. (Returns a WorkSurface object.)
- Contains (label string)
- Checks if the collection contains an item with the given label. (Returns a boolean object.)
- Item (index number)
- Returns the WorkSurface at the given index. (Returns a WorkSurface object.)
- Item (label string)
- Returns the WorkSurface with the given label. (Returns a WorkSurface object.)
- Items ()
- Returns a table of WorkSurface. (Returns a List of WorkSurface object.)
- UniqueName (label string)
- Generates a unique name base of of the provided base name.If the base name already exists in the collection, a digit will be appended until a valid name is generated. (Returns a boolean object.)
Index List
- [number]
- Returns the WorkSurface at the given index in the collection. (Read WorkSurface)
- [string]
- Returns the WorkSurface with the given name in the collection. (Read WorkSurface)
Property Details
Method Details
- Add (referenceface Face, offset Expression)
- Create a work surface referencing the given face with the given offset.
- Input Parameters
- referenceface(Face)
- The reference face to use.
- offset(Expression)
- The offset from the reference face.
- Return
- WorkSurface
- The work surface.
- Add (label string, referenceface Face, offset Expression)
- Create a work surface with the specified label.
- Input Parameters
- label(string)
- The label for the work surface.
- referenceface(Face)
- The reference face to use.
- offset(Expression)
- The offset from the reference face.
- Return
- WorkSurface
- The work surface.
- Contains (label string)
- Checks if the collection contains an item with the given label.
- Item (index number)
- Returns the WorkSurface at the given index.
- Input Parameters
- index(number)
- The index of the WorkSurface.
- Return
- WorkSurface
- The WorkSurface at the given index.
- Item (label string)
- Returns the WorkSurface with the given label.
- Input Parameters
- label(string)
- The label of the WorkSurface.
- Return
- WorkSurface
- The WorkSurface with the given label.
- Items ()
- Returns a table of WorkSurface.
- Return
- List of WorkSurface
- A table of WorkSurface.
- UniqueName (label string)
- Generates a unique name base of of the provided base name.If the base name already exists in the collection, a digit will be appended until a valid name is generated.