Hi,I'm trying to convert old VBA code from v8i to Connect edition but there is an error saying "Can't find DLL entry point mdlLevelLibrary_importWithFiltersEx in stdmdlbltin.dll". Where is it implemented?
#If VBA7 Then Declare PtrSafe Function mdlLevelLibrary_importWithFiltersEx Lib "stdmdlbltin.dll" ( _ ByVal pFileNameIn As LongPtr, _ ByVal levelLibraryFormatIn As Integer, _ ByVal importByMethodIn As Integer, _ ByVal modelRefIn As LongLong) As Long #Else Declare Function mdlLevelLibrary_importWithFiltersEx Lib "stdmdlbltin.dll" ( _ ByVal pFileNameIn As String, _ ByVal levelLibraryFormatIn As Integer, _ ByVal importByMethodIn As Integer, _ ByVal modelRefIn As Long) As Long #End If Public Sub test_importWithFiltersEx() For i = 1 To ActiveModelReference.Attachments.count Dim cAtt As ModelReference Set cAtt = ActiveModelReference.Attachments.item(i) Status = mdlLevelLibrary_importWithFiltersEx(StrPtr("C:\connect tests\oveerrides_test.dgnlib"), LEVEL_LIBRARY_FORMAT_DGN, 1, cAtt.MdlModelRefP) Status = mdlLevelTable_rewrite(cAtt.MdlModelRefP) Next i End Sub
Hi,
two wishes at first: Can you please edit your post and to use Insert > Insert Code tool to format properly VBA code? Also, please mention always MicroStation version (CONNECT is simply not enough), especially when dealing with native (and NET) APIs, the version can be crucial information.
brenks said:Where is it implemented?
Unfortunately it seems it's not implemented.
MicroStationAPI documentation contains only mdlLevelLibrary_importWithFilters method description. Using DLL Export Viewer (I recommend to use it every time there is a problem with accessing functions exported in dlls) it seems mdlLevelLibrary_* functions were moved from stdmdlbltin.dll to ustation.dll, but mdlLevelLibrary_importWithFiltersEx is not available.
mdlLevelLibrary_importWithFilters
mdlLevelLibrary_importWithFiltersEx
With regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point