Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Computer Aided Design - CAD > Programming with Microstation > Set seed file n...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 447 of 451
Post > Topic >>

Set seed file name during CREATE DRAWING (VBA)

by myzzard@[EMAIL PROTECTED] Mar 3, 2008 at 01:51 AM

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




 1 Posts in Topic:
Set seed file name during CREATE DRAWING (VBA)
myzzard@[EMAIL PROTECTED]  2008-03-03 01:51:47 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Jul 4 14:56:28 CDT 2008.