Type: BCS.Sym3.IView3DControl
View3D control
Methods
CatchProduct(System.Int32,System.Int32)
Catch product at x, y position. Position is in the control coordinates, not screen coordinates.
- Parameters:
- x: x coordinate
- y: y coordinate
- Returns:
- true if a product was found and catch at this position.
- Example:
This full example shows you how to drag a product to a new location
//-- Start drag mode
Editor.ActiveView3DHostControl.View3DControl.StartDragMode()
//-- Catch product
var success = Editor.ActiveView3DHostControl.View3DControl.CatchProduct(405, 200);
System.Threading.Thread.Sleep(1000);
if(success == true) {
var newX = 450;
var newY = 300;
//-- move product
Editor.ActiveView3DHostControl.View3DControl.MoveProduct(newX, newY);
//-- wait
System.Threading.Thread.Sleep(2000);
//-- release product
Editor.ActiveView3DHostControl.View3DControl.ReleaseProduct(newX, newY);
}
//-- Stop drag mode
Editor.ActiveView3DHostControl.View3DControl.StopDragMode()
GetEquipment(System.Int32,System.Int32)
Gets the equipment at x, y position. Position is in the control coordinates, not screen coordinates.
- Parameters:
- x: x coordinate in the control coordinates (not screen coordinates)
- y: y coordinate in the control coordinates (not screen coordinates)
- Returns:
- The equipment found at x, y position. returns null if not found
- Example:
This example shows you how to get an equipment at a specific position
var eq = Editor.ActiveView3DHostControl.View3DControl.GetEquipment(100, 200)
if(eq == null)
print("No equipment")
else
print(eq.Name)
MoveProduct(System.Int32,System.Int32)
Moves product at new x, y position. Position is in the control coordinates, not screen coordinates. Will work only if a product was previoulsy caught using ‘CatchProduct’
- Parameters:
- x: x coordinate
- y: y coordinate
- Example:
This full example shows you how to drag a product to a new location
//-- Start drag mode
Editor.ActiveView3DHostControl.View3DControl.StartDragMode()
//-- Catch product
var success = Editor.ActiveView3DHostControl.View3DControl.CatchProduct(405, 200);
System.Threading.Thread.Sleep(1000);
if(success == true) {
var newX = 450;
var newY = 300;
//-- move product
Editor.ActiveView3DHostControl.View3DControl.MoveProduct(newX, newY);
//-- wait
System.Threading.Thread.Sleep(2000);
//-- release product
Editor.ActiveView3DHostControl.View3DControl.ReleaseProduct(newX, newY);
}
//-- Stop drag mode
Editor.ActiveView3DHostControl.View3DControl.StopDragMode()
ReleaseProduct(System.Int32,System.Int32)
Release the product at x, y position. Position is in the control coordinates, not screen coordinates. Will work only if a product was previoulsy caught using ‘CatchProduct’
- Parameters:
- x: x coordinate
- y: y coordinate
- Example:
This full example shows you how to drag a product to a new location
//-- Start drag mode
Editor.ActiveView3DHostControl.View3DControl.StartDragMode()
//-- Catch product
var success = Editor.ActiveView3DHostControl.View3DControl.CatchProduct(405, 200);
System.Threading.Thread.Sleep(1000);
if(success == true) {
var newX = 450;
var newY = 300;
//-- move product
Editor.ActiveView3DHostControl.View3DControl.MoveProduct(newX, newY);
//-- wait
System.Threading.Thread.Sleep(2000);
//-- release product
Editor.ActiveView3DHostControl.View3DControl.ReleaseProduct(newX, newY);
}
//-- Stop drag mode
Editor.ActiveView3DHostControl.View3DControl.StopDragMode()
StartCtrlDragMode
Duplicate selected equipment and Starts ‘Ctrl-Drag’ mode for draging duplicated equipment
StartCtrlShiftDragMode
Duplicate selected equipment and Starts ‘Ctrl-Shift-Drag’ mode for draging duplicated equipment
StartDragMode
Starts ‘Drag’ mode. The mouse cursor becomes a ‘hand’. You need to be in this mode to be able to use CatchProduct, MoveProduct and ReleaseProduct
- Example:
This example shows you how to start and stop mode Drag mode
Editor.ActiveView3DHostControl.View3DControl.StartDragMode()
//....
Editor.ActiveView3DHostControl.View3DControl.StopDragMode()
StopCtrlDragMode
Stop ‘Ctrl-Drag’ mode. duplicated equipment will be placed at the current position.
StopCtrlShiftDragMode
Stop ‘Ctrl-Shift-Drag’ mode. duplicated equipment will be placed at the current position.
StopDragMode
Stop ‘Drag’ mode. The mouse cursor is back to a standard cursor.
- Example:
This example shows you how to start and stop mode Drag mode
Editor.ActiveView3DHostControl.View3DControl.StartDragMode()
//....
Editor.ActiveView3DHostControl.View3DControl.StopDragMode()
TakeScreenshot(BCS.Sym3.IBaseEquipment,System.String)
Take a screenshot of an equipment in this view
- Parameters:
- equipment:
- fullPathImageFile: