I am writing a macro in Microstation/ Geopak VBA to create Drainagr profile legend table for Drainage profiles . I activated GEOPAK drainage and opened AL_KHARJ_SD_001_detail_design_OF-A3.gdf. But my program is not responding while debugging the Set drainage_file = geopak.OpenDrainageByFile(strname) marked code and it is closing the file without any response. Please help me where it went wrong.
Public drainage_file As DrainagePublic DPROFILES As DrainageProfiles
Private Sub UserForm_initialize()Me.Caption = "PROFILE-TABLES CREATION"Cboprofile.Style = fmStyleDropDownListSet drainage_file = drain_file("AL_KHARJ_SD_001_detail_design_OF-A3.gdf")' Set drainage_file = drain_file(fileopenA()) Set DPROFILES = drainage_file.ProfilesDim cc As LongFor cc = 1 To DPROFILES.COUNTCboprofile.AddItem DPROFILES.Item(cc).NameNext ccfrmproftable.ShowEnd Sub
Function drain_file(strname As String) As DrainageSet drainage_file = geopak.OpenDrainageByFile(strname)If (drainage_file Is Nothing) ThenShowStatus "drainage design file is not selected"MsgBox "drainage design file is not selected:"MsgBox "exiting program"Exit FunctionElseEnd Ifdrain_file = drainage_fileEnd Function
This Macros is working in V8 version but in V8i select series -2 it is halting at the red marked statement.
Is there anything need to add extra for vba routines from v8 to work in in select series-2 . Please somebody please help me in this regard.