This class defines a drawing.
Add
| Void Add (List`1 polys, Layer layer) |
Add
| Void Add (List`1 entities) |
Add
| Void Add (List`1 entities, Layer layer) |
Add
| Void Add (Entity entity) |
Add
| Void Add (Entity entity, Layer layer) Add a drawing entity to the current active layer.
Parameters:
prim: |
Add
| Void Add (List`1 polys) |
AddPrimitiveToIndex
| Void AddPrimitiveToIndex (Entity prim) Used internally. Adds a primitive to the drawing's index of primitives. This does not add the primitive to any layers. Use Add method for that.
Parameters:
prim: |
ChangeEntityOrder
| Int32 ChangeEntityOrder (Layer layer, Layer newlayer, Int32 fromIndex, Int32 toIndex) |
ChangeLayerOrder
| Int32 ChangeLayerOrder (Int32 fromIndex, Int32 toIndex) |
ChangeMOPOrder
| Int32 ChangeMOPOrder (CAMPart part, CAMPart newpart, Int32 fromIndex, Int32 toIndex) |
ChangePartOrder
| Int32 ChangePartOrder (Int32 fromIndex, Int32 toIndex) |
CheckModified
| Boolean CheckModified () Checks whether the file is modified and prompts whether to save.
Returns: True if the drawing is not modified or the drawing has been saved. |
CheckPrimitiveID
| Void CheckPrimitiveID (Entity prim) |
ClearAll
| Void ClearAll () Removes all the layers and primitives from a drawing. |
Copy
| Void Copy (CADFile src) Make a copy of another CADFile.
Parameters:
gf: Source drawing file. |
CreateLayer
| Layer CreateLayer (String layername) Creates a new layer, adds it to the drawing and makes it active. The name is checked against the user config file to find any default Layers matching that name.
Parameters:
layername: The name of the layer to create.
Returns: |
CreatePart
| CAMPart CreatePart (String name) |
EnsureActiveLayer
| Layer EnsureActiveLayer (Boolean with_undo) |
EnsureActivePart
| CAMPart EnsureActivePart (Boolean with_undo) |
FindPrimitive
| Entity FindPrimitive (Int32 ID) Finds a primitive in the drawing given it's ID.
Parameters:
ID: The ID to find.
Returns: The primitive with the matching ID if found, otherwise null. |
FireAfterEntitiesAddedEvent
| Void FireAfterEntitiesAddedEvent (List`1 entities) |
FireAfterEntitiesAddedEvent
| Void FireAfterEntitiesAddedEvent (Entity entity) |
FireAfterEntitiesRemovedEvent
| Void FireAfterEntitiesRemovedEvent (List`1 entities) |
FireAfterEntitiesRemovedEvent
| Void FireAfterEntitiesRemovedEvent (Entity entity) |
FireAfterMOPsAddedEvent
| Void FireAfterMOPsAddedEvent (List`1 mops) |
FireAfterMOPsAddedEvent
| Void FireAfterMOPsAddedEvent (MachineOp mop) |
FireAfterMOPsRemovedEvent
| Void FireAfterMOPsRemovedEvent (List`1 mops) |
FireAfterMOPsRemovedEvent
| Void FireAfterMOPsRemovedEvent (MachineOp mop) |
FireBeforeEntitiesAddedEvent
| Void FireBeforeEntitiesAddedEvent (List`1 entities) |
FireBeforeEntitiesAddedEvent
| Void FireBeforeEntitiesAddedEvent (Entity entity) |
FireBeforeEntitiesRemovedEvent
| Void FireBeforeEntitiesRemovedEvent (List`1 entities) |
FireBeforeEntitiesRemovedEvent
| Void FireBeforeEntitiesRemovedEvent (Entity entity) |
GetExtents
| Void GetExtents (PointF& min, PointF& max) Find the extrema points of all the visible primitives in the drawing.
Parameters:
min: A point that will receive the minimum coordinates.
max: A point that will receive the maximum coordinates. |
GetScreenExtents
| Void GetScreenExtents (PointF& min, PointF& max, Matrix4x4F t) |
HasChanges
| Boolean HasChanges () |
HasLayer
| Boolean HasLayer (String layername) Check if a layer exists.
Parameters:
layername:
Returns: True if the drawing contains a layer with this name. |
HasPart
| Boolean HasPart (String name) |
NewFile
| Boolean NewFile () Creates an empty document with one layer ("DEfault").
Returns: False if the document could not be cleared. |
OnModified
| Void OnModified () Calling this method triggers a DocumentModified event (unless SuspendEvents is true) and marks the drawing as modified. |
Open
| Boolean Open () Prompts for a filename ten opens a drawing (.cambam) file.
Returns: True if the file was opened successfully. |
Open
| Boolean Open (String filename) Open a drawing (.cambam) file.
Parameters:
filename: The name of the file to open.
Returns: True if the file was opened successfully. |
PropertyChanged
| Void PropertyChanged (String propertyname, Object newvalue) |
PropertyChanging
| Void PropertyChanging (String propertyname, Object newvalue) |
RemovePrimitive
| Void RemovePrimitive (Entity entity) Remove a primitive from the drawing.
Parameters:
prim: The primitive to remove. |
RemovePrimitiveID
| Void RemovePrimitiveID (Int32 ID) |
RemovePrimitives
| Void RemovePrimitives (List`1 entities) |
Rename
| Boolean Rename (String name) |
Save
| Boolean Save (String filename) Save the drawing to an alternative filename.
Parameters:
filename: The name of the file to save to.
Returns: |
Save
| Boolean Save () Save the drawing.
Returns: True if the save was successful. |
SaveAs
| Boolean SaveAs () Save the drawing to an alternative filename.
Returns: True if the save was successful. |
SetActiveLayer
| Void SetActiveLayer (String name) Set the active layer given it's name.
Parameters:
name: The layer name to make active. |
SetActivePart
| Void SetActivePart (String name) Set the active part given it's name.
Parameters:
name: The part name to make active. |
ShouldSerializeToolpathVisiblility
| Boolean ShouldSerializeToolpathVisiblility () |
Update
| Boolean Update () |