.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

AddHandler to BlockReferences And AttributeReference

2 REPLIES 2
Reply
Message 1 of 3
jcheard
298 Views, 2 Replies

AddHandler to BlockReferences And AttributeReference

I use AutoCAD 2006 and have a number of VBA applications I want to port over to .Net

In VBA I could capture events on a particular BlockReference or AttributeReference using the following code in a class module "clsAttEvent"
{code}
Public WithEvents oAtt As AcadAttributeReference
Private Sub oAtt_Modified(ByVal pObject As IAcadObject)
'Stuff happens here
End Sub
{code}
as long as I had an object of type clsAttEvent in scope and had set the oAtt to an attribute reference

I can't seem to accomplish the same using the ObjectARX .Net Managed Wrappers

Is there a way to have a BlockReference or AttributeReference capture events in AutoCAD 2006 w/o having to capture all database events first and filter?

If not, what is the earliest version (if any) of AutoCAD that allows events to be bound to BlockReferences or AttributeReferences?
2 REPLIES 2
Message 2 of 3
norman.yuan
in reply to: jcheard

There is no DBObject/Entity level of event (Erased/Modified/...) exposed in .NET API until Acad2009. With Acad2006-8, you have to do it at Database level, e.g handling Database.ObjectModified event. The ObjectEventArgs provides a reference of DBObject type to the modified entity

Norman Yuan

Drive CAD With Code

EESignature

Message 3 of 3
jcheard
in reply to: jcheard

Hey Norm.

Thank you very much for your input. You've told me exactly what I needed to know!

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost