I have never made a macro before but I have a command want to repeat with a loop. All i need to do is add 500 ft in x direction each time. Can anyone tell me why this wouldn't work ??
Sub main Dim startPoint As MbePoint Dim point As MbePoint, point2 As MbePoint ' Coordinates are in master units startPoint.x = 1131371.644684# startPoint.y = 97271.924289# startPoint.z = 0.000000#
i=0 Do while i < 200 point.x = startPoint.x +500.000000*i point.y = startPoint.y point.z = startPoint.z point2.x = point.x + 300.000000# point2.y = point.y - 80.000000# point2.z = point.z MbeSendDragPoints point, point2, 1%
' Start a command MbeSendCommand "MeasureArea ICON "
point.x = startPoint.x + 650.000000*i point.y = startPoint.y + 0.000000# point.z = startPoint.z MbeSendDataPoint point, 1%
point.x = startPoint.x + 650.000000*i point.y = startPoint.y - 105.000000# point.z = startPoint.z MbeSendDataPoint point, 1%
' Send a reset to the current command MbeSendReset i = i+1
Loop End Sub
Hello James - you have posted in the Communities Feedback Forum. Please let us know what Bentley product (and version) you are using, so that we can move your post to the appropriate Product Community forum.
Jesse DringoliTechnical Support Manager, Haestad ProductsBentley Communities Site AdministratorBentley Systems, Inc.