Hi everybody,
I'm wirting an aplication in VBA which creates new drawing. The names
of new DGN and seed file come from config file.
I recorded macro doing this operation.
I got code like below:
Private Sub IModalDialogEvents_OnDialogOpened(ByVal DialogBoxName As
String, DialogResult As MsdDialogBoxResult)
If DialogBoxName = "New" Then
' The following statement opens modal dialog "Select Seed File"
CadInputQueue.SendCommand "MDL COMMAND
MGDSHOOK,fileOpen_selectSeedFileCmd"
CadInputQueue.SendCommand "MDL COMMAND
MGDSHOOK,fileList_setFilterCmd *.dgn"
CadInputQueue.SendCommand "MDL COMMAND
MGDSHOOK,fileList_setDirectoryCmd C:\Program Files\Bentley\Workspace
\Projects\OpisyT\dgn\makra\"
CadInputQueue.SendCommand "MDL COMMAND
MGDSHOOK,fileList_setFileNameCmd 707110700.dgn"
' Remove the following line to let the user close the dialog
box.
DialogResult = msdDialogBoxResultOK
End If ' New
If DialogBoxName = "Select Seed File" Then
CadInputQueue.SendCommand "MDL COMMAND
MGDSHOOK,fileList_setFilterCmd *.dgn"
CadInputQueue.SendCommand "MDL COMMAND
MGDSHOOK,fileList_setDirectoryCmd C:\Program Files\Bentley\Workspace
\Projects\OpisyT\dgn\makra\"
CadInputQueue.SendCommand "MDL COMMAND
MGDSHOOK,fileList_setFileNameCmd Opis topograficzny.dgn"
' Remove the following line to let the user close the dialog
box.
DialogResult = msdDialogBoxResultOK
End If ' Select Seed File
End Sub
While debugging this code it never steps into < If DialogBoxName =
"Select Seed File" Then> statement.
I thought that
CadInputQueue.SendCommand "MDL COMMAND
GDSHOOK,fileOpen_selectSeedFileCmd"
line causes it. But it doesn't.
I'd like to know how to set seed file name to create new drawing.
Anybody can help me?
Regards
myzzard


|