I am absolutely perplexed by a problem I am having... I have a plugin that creates cogo points, and for some users it seems to crash every time, but for others it works just fine (as for myself, I have zero problems with it). The subroutine is simple:
Using civLock As DocumentLock = acadDoc.LockDocument
Using trans As Transaction = db.TransactionManager.StartTransaction()
Try
Dim Location As New Point3d(PointX, PointY, PointZ)
Dim CogoPoints As CogoPointCollection = civilDoc.CogoPoints
Dim PointID As ObjectId = CogoPoints.Add(Location)
Dim NewPoint As CogoPoint = PointID.GetObject(OpenMode.ForWrite)
NewPoint.RawDescription = PointD
NewPoint.ApplyDescriptionKeys()
trans.Commit()
Catch ex As ArgumentException
End Try
End Using
End Using
The fatal error occurs when the point is added, prior to the attempt to assign a raw description. What is boggling me is that, like I said, it works flawlessly for me (and others) but not at all for some users.
Hi,
Is this specific to a particular DWG file for those users where it crashes ?
What's the error message it shows ?
Thanks,