VB6 & MbeRefFile.saveSettings

Discussion in 'Microstation' started by Darren D, Aug 7, 2003.

  1. Darren D

    Darren D Guest

    I am trying to use the following code through VB6 (without success I might
    add)

    If ustn.MbeReffiles(ref_loop).saveSettings(1) = ustn.Mbe_Success Then
    MsgBox "saved"
    Else
    MsgBox "no save"
    End If

    From my understanding, if you set the MbeRefile.savesettings optional
    argument (overrideUserPref) to a non zero value it will save the changes you
    have made to the MbeRefile object regardless of the "Save Settings to Save
    Changes" preference setting !!!

    From the Ustn basic help File ....

    If the optional overrideUserPref argument is zero or omitted, the function
    first checks the state of the "Save Settings to Save Changes" user
    preference. If this preference is TRUE, it indicates that the user wishes to
    save reference file manipulations only when the MicroStation "Save Settings"
    operation is performed. In that case mbeRefFile.saveSettings returns
    MBE_RefSaveDeferred (1602) without actually saving the new settings. If
    overrideUserPref is nonzero, or the "Save Settings to Save Changes"
    preference is FALSE, the new settings are saved.


    I can get it this code to work if I have the "Save Settings to Save Changes"
    preference setting as TRUE, but not if I have it set to False ??....and the
    function always returns Mbe_Success regardless if it has worked or not...

    This code seems to function fine running purely as a ustn macro...

    Has anyone else used this within VB6 ???...any suggestions ???

    regards

    Darren D
    Perth, Western Australia
     
    Darren D, Aug 7, 2003
    #1
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.