acdbmgd.dll, accoremgd.dll, acmgd.dll more issues
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi all,
I managed to load the 3 reference files in order to have access to: Imports Autodesk...
Now I have the three imports without problems:
Imports Autodesk.AutoCAD.Runtime
Imports Autodesk.AutoCAD.ApplicationServices
Imports Autodesk.AutoCAD.DatabaseServices
and the module also without editor problems:
Public Sub UpdateBlockAttributes(ByVal attName As String, ByVal attValue As String)
Dim acDb = HostApplicationServices.WorkingDatabase
Dim acEd = Application.DocumentManager.MdiActiveDocument.Editor
Dim blockName = "blkAttributes" ' Same block name for all drawings
Dim _success As Boolean = False
Dim _attempts As Integer = 1
While _success = False And _attempts < MAX_ATTEMPTS
Try
Using acTrans = acDb.TransactionManager.StartTransaction()
Dim acBlockTable As BlockTable = acTrans.GetObject(acDb.BlockTableId, OpenMode.ForRead)
Dim acBlockTableRecord As BlockTableRecord = acTrans.GetObject(acBlockTable(BlockTableRecord.ModelSpace), OpenMode.ForRead)
For Each blkId In acBlockTableRecord
Dim acBlock As BlockReference = acTrans.GetObject(blkId, OpenMode.ForRead)
If acBlock.Name.Equals(blockName, StringComparison.CurrentCultureIgnoreCase) Then
For Each attId In acBlock.AttributeCollection
Dim acAtt As AttributeReference = acTrans.GetObject(attId, OpenMode.ForRead)
If acAtt.Tag.Equals(attName, StringComparison.CurrentCultureIgnoreCase) Then
acAtt.UpgradeOpen()
acAtt.TextString = attValue
End If
Next
End If
Next
acTrans.Commit()
End Using
If _attempts > 1 Then DebugAttempt(_attempts, Me, GetCurrentMethod().Name)
_success = True
Catch ex As Exception
DebugError(GetCurrentMethod().Name, ex.Message)
System.Threading.Thread.Sleep(15)
_attempts += 1
End Try
End While
End Sub
When I run the application, I get the following erorr: [autocad reference error.jpg]
and exception unhandleded: [autocad exception unhandleded.jpg]
On my computer I have installed:
Visual Studio 2017 version 15.9.10
.NET Framework Version 4.7.03062
Autocad full version 2016
Windows 8.1 Pro
After installing new version of AutoCAD and new version of Visaul Studio, I don't know what else to do.
Please help.
Thanks,
alex