
' pm.d3m points move bdeck 11/2018
' Macro to move a set of selected points by a user-input displacement
' Adapted from SETSELECTEDPOINTS demo in SDK Macro Language Reference Manual
' This version has a built-in verify/undo feature that does not disrupt the point selection
' 1) select one or more entities
' 2) drag select one or more points on the selection
' 3) run the macro
' 4) input xyz values for the desired displacement
' 5) backspace to undo; or any other key or click to accept
SETSELECTEDPOINTS
If Sys(1) < 1 Then
Message "No points selected. Try again."
end
end If
input "Input desired point displacement in X direction ", dx
input "Input desired point displacement in Y direction ", dy
input "Input desired point displacement in Z direction ", dz
'input "Input desired X, Y, Z point displacements (separate by commas or spaces)", dx, dy, dz 'alternative sinlge-line input method
gosub ptmover
Print " [Backspace] to undo; any other key or click to accept"
anykey k
if k=8 then ' if backspace key was pressed
dx=-dx
dy=-dy
dz=-dz
gosub ptmover
endif
end
ptmover:
>GroupPointsMove
{
<Pointxyz [0, 0, 0]
<PointRel [dx,dy,dz]
}
return