While still in the BASIC editor for your Macro, you can create a prompt to accept the setting of the ACS when the model is loaded.
Click Edit > Custom Dialog > Edit.
The Builder dialog box opens. Here you define the dialog box to open and the options associated with it.
A new dialog box opens allowing you to edit the text.
To include a message, add a label from the Builder Tools menu and place that label on the dialog box.
In the Builder window labeled PushButton, double-click the items you want to label.
Change the text for these items to provide Yes and No buttons, and a label asking what to do next.
Save the dialog box and return to your Script
Edit script to accept input from the user
The following is an edit to the example using this new Startup dialog box.
'Author : INTERGRAPH Corp
Project : Some Project
'Template file : Unit1.bas
'Date : 3/1/2010
'DEFINE ACS SYSTEM FOR UNIT 1
Dim startPoint As MbePoint
Dim point As MbePoint, point2 As MbePoint
Dim Button As Long
Dim Msg As Integer
Button = MbeOpenModalDialog (1)
If (Button = MBE_BUTTON_OK) Then
'First remove existing ACS from design file if update required
MbeSendKeyin "Delete Acs UNIT#1"
'Define ACS 0,0,0 origin within MicroStation design file
MbeSendKeyin "Define Acs Points "
'Define ACS X Axis (if rotation required use DI=distance,angle)
'Define ACS Y Axis (if rotation required use DI=distance,angle)
'Save and Attach New ACS tp design file
MbeSendKeyin "Save Acs UNIT#1"
MbeSendKeyin "Attach Acs UNIT#1"
MbeSendKeyin "Attach Acs"
'Set your tentative point readout to use the new Coord System
MbeSendKeyin "SET TPMODE ACSDelta"
MbeSendKeyin "SET TPMODE ACSLocate"
'Once the ACS is set pass a Message Box to the user saying it was set
Msg = MbeMessageBox ("Your Auxiliary Coordinate system is set to Unit#1")
'Here we can tell the user via the Microstation prompt that the
Call MbeWritePrompt ("You have declined to set an Auxiliary Coordinate system")