We are trying to write our first Macro for use with our Pentable. What we want to do is have the pen table "Drop element" based on criteria established, the print the element then undo the "drop element" to return it to it original status. So we started with having our steps recorded, but are unable to figure out the "Pen Table Print Element Hook". The following is our macro called "Drop_element". Any help would be greatly appreciated as we trying to learn how to do this and this seemed to be easy, but apparently it is not.
' Drop elements and undo drop
Sub main
Dim startPoint As MbePoint
Dim point As MbePoint, point2 As MbePoint
' Start a command
MbeSendCommand "DROP ELEMENT "
' Set a variable associated with a dialog box
MbeSetAppVariable "DROP", "dropOptions.complex", -1&
MbeSetAppVariable "DROP", "dropOptions.strings", -1&
MbeSetAppVariable "DROP", "dropOptions.sharedCells", -1&
MbeSetAppVariable "DROP", "dropOptions.mlines", -1&
MbeSendCommand "CHOOSE ALL "
' Coordinates are in master units
startPoint.x = 120.583542#
startPoint.y = 130.883882#
startPoint.z = 0.000000#
' Send a data point to the current command
point.x = startPoint.x
point.y = startPoint.y
point.z = startPoint.z
MbeSendDataPoint point, 1%
point.x = startPoint.x + 0.234617#
point.y = startPoint.y - 1.156249#
MbeSendCommand "UNDO "
End Sub