[CONNECT] Disable Workset Verification

Hello everybody,

in our organization we work in a workspace/workset configuration within our cad operators have to load/open different dgn files not assigned to any worksets.

Is there an environment variable/method/function im CONNECT to suppress the workset verification? Because the dgn files were manipulated from different worksets. An assignment to only one workset isn't practical.

I moved the dgn files to directories the variables MS_WORKSETMISMATCH_ALERT_EXCLUDE_* are pointing to but at all times the workset alert message appers.

best regards

Daniel

Parents
  • We do a lot of drawing processing (100s a day) using VB.Net/scripts.  This is becoming a severe sticking point for us upgrading to the CONNECT version.  We have an internally developed drawing management system which needs to get past the WorkSet Alert Dialog pop up.

    Has anyone come up with a work around?

    Can anyone from Bentley respond as to how to address this problem?  Is there a Support Ticket associate with this issue?

  • Thanks to the likes of much smarter MicroStation developers than myself, and particularly to Jon Summers, Yongan Fu, Changsong Ling, Jan Šlegr , et al. we seemed to come up with a VBA solution that works for us, which allows us to turn ON & OFF the WorkSet Mismatch Alerts for a MicroStation session, or forever.

    I do not take credit for this code, but I do take advantage of it. Thanks to all who contributed. By default, if you turn the Alerts OFF, you open DGN files without interruption, and use your currently-active Workset. MicroStation ignores the DGN file's WorkSet brand.

    The three main methods are:

    WRK_TurnAlertsON - Turns them ON (as they are by default)

    WRK_TurnAlertsOFF - Turns them OFF

    OnProjectLoad - Turns them on if this is Auto-Loaded

    We have menu options that execute both of the above, plus the auto-loaded is for those who don't want to make the decision, and just want the Alerts to disappear. Thanks all! g.houck

    Option Explicit
    
    ' ------------------------------------------------------------------------
    ' Enums Describing MicroStation Processing States
    ' ------------------------------------------------------------------------
    
    ' define the Batch Processing State values
    
    Public Enum PROCESSSTATE
        PROCESSSTATE_Inactive = 0
        PROCESSSTATE_Processing = 1
        PROCESSSTATE_Paused = 2
        PROCESSSTATE_Done = 3
        PROCESSSTATE_Cancelled = 4
        PROCESSSTATE_OpeningFile = 5
        PROCESSSTATE_AnalyzeFile = 6
        PROCESSSTATE_ClosedFile = 7
    End Enum
    
    ' Declarations into MicroStation DLLs
    
    Private Declare PtrSafe Sub mdlSystem_setBatchProcessingState Lib "ustation.dll" (ByVal procState As Long, ByVal s As LongPtr)
    Private Declare PtrSafe Function mdlSystem_getBatchProcessingState Lib "stdmdlbltin.dll" () As Long
    
    ' ------------------------------------------------------------------------
    ' OnProjectLoad - If autoloaded it will check Config Variable _WRK_WRKSET_ALERTS_OFF for Y|T|1
    '                 If set, it turns OFF Alerts
    '                 If you remove the Config Variable (flag) Code, it will always turn Alerts OFF
    ' ------------------------------------------------------------------------
    Public Sub OnProjectLoad(Optional ByVal IgnoreMe As Integer)
      Dim flag As String
      
      flag = UCase(Left(RTrim(LTrim(Application.ActiveWorkspace.ExpandConfigurationVariable("$(_WRK_WRKSET_ALERTS_OFF)"))), 1))
      
      If (flag = "Y" Or flag = "T" Or flag = "1") Then
        Call WRK_TurnAlertsOFF
      End If
    End Sub
    
    ' ------------------------------------------------------------------------
    ' WRK_TurnAlertsON - Turns WorkSet Mismatch Alerts ON
    ' ------------------------------------------------------------------------
    Public Sub WRK_TurnAlertsON()
        mdlSystem_setBatchProcessingState PROCESSSTATE_Inactive, 0
    End Sub
    
    ' ------------------------------------------------------------------------
    ' WRK_TurnAlertsOFF - Turns WorkSet Mismatch Alerts OFF
    ' ------------------------------------------------------------------------
    Public Sub WRK_TurnAlertsOFF()
        mdlSystem_setBatchProcessingState PROCESSSTATE_Processing, 0
    End Sub
    
    ' ------------------------------------------------------------------------
    ' WKR_AreAlertsOFF - Returns TRUE if Alerts have been turned OFF
    '                    Assumes anything but PROCESSSTATE_Processing is FALSE
    ' ------------------------------------------------------------------------
    Function WRK_AreAlertsOFF() As Boolean
      Dim rtc As Long
      rtc = mdlSystem_getBatchProcessingState()
      
      If (rtc = PROCESSSTATE_Processing) Then
        WRK_AreAlertsOFF = True
      Else
        WRK_AreAlertsOFF = False
      End If
    End Function
    
    

Reply
  • Thanks to the likes of much smarter MicroStation developers than myself, and particularly to Jon Summers, Yongan Fu, Changsong Ling, Jan Šlegr , et al. we seemed to come up with a VBA solution that works for us, which allows us to turn ON & OFF the WorkSet Mismatch Alerts for a MicroStation session, or forever.

    I do not take credit for this code, but I do take advantage of it. Thanks to all who contributed. By default, if you turn the Alerts OFF, you open DGN files without interruption, and use your currently-active Workset. MicroStation ignores the DGN file's WorkSet brand.

    The three main methods are:

    WRK_TurnAlertsON - Turns them ON (as they are by default)

    WRK_TurnAlertsOFF - Turns them OFF

    OnProjectLoad - Turns them on if this is Auto-Loaded

    We have menu options that execute both of the above, plus the auto-loaded is for those who don't want to make the decision, and just want the Alerts to disappear. Thanks all! g.houck

    Option Explicit
    
    ' ------------------------------------------------------------------------
    ' Enums Describing MicroStation Processing States
    ' ------------------------------------------------------------------------
    
    ' define the Batch Processing State values
    
    Public Enum PROCESSSTATE
        PROCESSSTATE_Inactive = 0
        PROCESSSTATE_Processing = 1
        PROCESSSTATE_Paused = 2
        PROCESSSTATE_Done = 3
        PROCESSSTATE_Cancelled = 4
        PROCESSSTATE_OpeningFile = 5
        PROCESSSTATE_AnalyzeFile = 6
        PROCESSSTATE_ClosedFile = 7
    End Enum
    
    ' Declarations into MicroStation DLLs
    
    Private Declare PtrSafe Sub mdlSystem_setBatchProcessingState Lib "ustation.dll" (ByVal procState As Long, ByVal s As LongPtr)
    Private Declare PtrSafe Function mdlSystem_getBatchProcessingState Lib "stdmdlbltin.dll" () As Long
    
    ' ------------------------------------------------------------------------
    ' OnProjectLoad - If autoloaded it will check Config Variable _WRK_WRKSET_ALERTS_OFF for Y|T|1
    '                 If set, it turns OFF Alerts
    '                 If you remove the Config Variable (flag) Code, it will always turn Alerts OFF
    ' ------------------------------------------------------------------------
    Public Sub OnProjectLoad(Optional ByVal IgnoreMe As Integer)
      Dim flag As String
      
      flag = UCase(Left(RTrim(LTrim(Application.ActiveWorkspace.ExpandConfigurationVariable("$(_WRK_WRKSET_ALERTS_OFF)"))), 1))
      
      If (flag = "Y" Or flag = "T" Or flag = "1") Then
        Call WRK_TurnAlertsOFF
      End If
    End Sub
    
    ' ------------------------------------------------------------------------
    ' WRK_TurnAlertsON - Turns WorkSet Mismatch Alerts ON
    ' ------------------------------------------------------------------------
    Public Sub WRK_TurnAlertsON()
        mdlSystem_setBatchProcessingState PROCESSSTATE_Inactive, 0
    End Sub
    
    ' ------------------------------------------------------------------------
    ' WRK_TurnAlertsOFF - Turns WorkSet Mismatch Alerts OFF
    ' ------------------------------------------------------------------------
    Public Sub WRK_TurnAlertsOFF()
        mdlSystem_setBatchProcessingState PROCESSSTATE_Processing, 0
    End Sub
    
    ' ------------------------------------------------------------------------
    ' WKR_AreAlertsOFF - Returns TRUE if Alerts have been turned OFF
    '                    Assumes anything but PROCESSSTATE_Processing is FALSE
    ' ------------------------------------------------------------------------
    Function WRK_AreAlertsOFF() As Boolean
      Dim rtc As Long
      rtc = mdlSystem_getBatchProcessingState()
      
      If (rtc = PROCESSSTATE_Processing) Then
        WRK_AreAlertsOFF = True
      Else
        WRK_AreAlertsOFF = False
      End If
    End Function
    
    

Children
No Data