.NET

Reply
Valued Contributor
NKCAUTOCAD01
Posts: 86
Registered: ‎08-31-2011
Message 1 of 3 (158 Views)
Accepted Solution

About an object event, I want you to tell me.

158 Views, 2 Replies
01-15-2013 11:14 PM

About an object event, I want you to tell me.

Using AutoCAD.NETAPI, I had same advise the method that handled object event

(Objec tAppended) in our discussion group

and came to be able to pick up an event when I carried out paste1 in the following logics.

 

Public Sub Paste1() 'object addition event

  Dim tdoc As Document = Application.DocumentManager.MdiActiveDocument Dim tdb As

  Database = tdoc.Database AddHandler tdb.ObjectAppended, AddressOf ObjectAdd

End Sub

 

 However, trigger of the double of the number of element that I stuck by

this event occurs when I stick the element which I took in _copybase in _pasteclip.

 

In addition, ObjectId, OwnerId of the element becomes inherent each, too and which is

a real element or, in each trigger, cannot distinguish it.I analyze only a stuck element

I want to handle it, would you advise a method to distinguish?

Thanking you in advance.


NKCAUTOCAD01 wrote:

However, trigger of the double of the number of element that I stuck by

this event occurs when I stick the element which I took in _copybase in _pasteclip.


Command _PASTECLIP create temporary block definition with entities copied  _COPYBASE command. After specifying insertion point, block will be erased and entities added to current space (Model or Paper). You can check Entity.BlockId equal Database.CurrentSpaceId or no.

Moderator
Alexander.Rivilis
Posts: 1,412
Registered: ‎04-09-2008
Message 2 of 3 (146 Views)

Re: About an object event, I want you to tell me.

01-16-2013 02:22 AM in reply to: NKCAUTOCAD01

NKCAUTOCAD01 wrote:

 However, trigger of the double of the number of element that I stuck by

this event occurs when I stick the element which I took in _copybase in _pasteclip.


Command _PASTECLIP create temporary block definition with entities copied  _COPYBASE command. After specifying insertion point, block will be erased and entities added to current space (Model or Paper). You can check Entity.BlockId equal Database.CurrentSpaceId or no.


Пожалуйста не забывайте про Утвердить в качестве решения! Утвердить в качестве решения и Give Kudos!Баллы
Please remember to Accept Solution! Accept as Solution and Give Kudos!Kudos

Valued Contributor
NKCAUTOCAD01
Posts: 86
Registered: ‎08-31-2011
Message 3 of 3 (126 Views)

Re: About an object event, I want you to tell me.

01-16-2013 05:12 PM in reply to: Alexander.Rivilis

Dear Mr. Alexander.Rivilis

Thank you for the Great advice.

It was saved very much.Yours sincerely,
NKCAUTOCAD01 (M.Tsukamoto)...

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.