NamedPointCollection
A collection of named points in the model.
Example
app = cf.GetApplication() project = app:NewProject() -- Create various named points project.NamedPoints:Add("pt1", 1.2, 1.4, 0.6) project.NamedPoints:Add("pt2", 0.2, 2.4, 0.1) project.NamedPoints:Add("pt3", -1.2, 2.5, 1.0) -- Set the Z value of "pt1" for all the named points for key,point in pairs(project.NamedPoints) do point.Z = project.NamedPoints["pt1"].Z end
Usage locations (collections)
The following objects contain the NamedPointCollection collection:
Property List
Method List
- Add (name string, x Expression, y Expression, z Expression)
- Create a named point from the given coordinate expressions. (Returns a NamedPoint object.)
- Contains (label string)
- Checks if the collection contains an item with the given label. (Returns a boolean object.)
- Item (index number)
- Returns the NamedPoint at the given index. (Returns a NamedPoint object.)
- Item (label string)
- Returns the NamedPoint with the given label. (Returns a NamedPoint object.)
- Items ()
- Returns a table of NamedPoint. (Returns a List of NamedPoint 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 NamedPoint at the given index in the collection. (Read NamedPoint)
- [string]
- Returns the NamedPoint with the given name in the collection. (Read NamedPoint)
Property Details
Method Details
- Add (name string, x Expression, y Expression, z Expression)
- Create a named point from the given coordinate expressions.
- Input Parameters
- name(string)
- The point name.
- x(Expression)
- The X coordinate expression.
- y(Expression)
- The Y coordinate expression.
- z(Expression)
- The Z coordinate expression.
- Return
- NamedPoint
- The named point.
- Contains (label string)
- Checks if the collection contains an item with the given label.
- Item (index number)
- Returns the NamedPoint at the given index.
- Input Parameters
- index(number)
- The index of the NamedPoint.
- Return
- NamedPoint
- The NamedPoint at the given index.
- Item (label string)
- Returns the NamedPoint with the given label.
- Input Parameters
- label(string)
- The label of the NamedPoint.
- Return
- NamedPoint
- The NamedPoint with the given label.
- Items ()
- Returns a table of NamedPoint.
- Return
- List of NamedPoint
- A table of NamedPoint.
- 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.