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

Noun-Verb Object Erase

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
SRSDS
433 Views, 2 Replies

Noun-Verb Object Erase

SRSDS
Advisor
Advisor

I need to review entities before erasing them.

I was assessing entities in the CommandWillStart and finding associated objects

In CommandWillStart I collected any associated objects via their Xdata.

In the CommandWillEnd Event I dealt with their associated objects.

 

Then I realized there was a Noun-Verb Object Erase. (Where the user entered the Erase command then selected objects.)

 

I could use an Erase ObjectOverrule but that would need to open and close a Transaction for each entity to review it's Xdata. Would this slow my app down? Or is there more sensible alternative?

 

 

0 Likes

Noun-Verb Object Erase

I need to review entities before erasing them.

I was assessing entities in the CommandWillStart and finding associated objects

In CommandWillStart I collected any associated objects via their Xdata.

In the CommandWillEnd Event I dealt with their associated objects.

 

Then I realized there was a Noun-Verb Object Erase. (Where the user entered the Erase command then selected objects.)

 

I could use an Erase ObjectOverrule but that would need to open and close a Transaction for each entity to review it's Xdata. Would this slow my app down? Or is there more sensible alternative?

 

 

2 REPLIES 2
Message 2 of 3
jabowabo
in reply to: SRSDS

jabowabo
Mentor
Mentor
Accepted solution

Maybe watch for the Object.Erased event and unerase as necessary.

0 Likes

Maybe watch for the Object.Erased event and unerase as necessary.

Message 3 of 3
SRSDS
in reply to: jabowabo

SRSDS
Advisor
Advisor
Accepted solution

I think I understand the problems I've been having

A)

I don't need a transaction to read xdata in db.ObjectErased

Dim myXdata As Array = e.DBObject.GetXDataForApplication(AppName).AsArray

B)

Even if I did I was having problems when I was using .StartTransaction when I should have been using .StartOpenCloseTransaction

 

Thank you. That pointed me in the direction I needed to recap my memory.

 

 

0 Likes

I think I understand the problems I've been having

A)

I don't need a transaction to read xdata in db.ObjectErased

Dim myXdata As Array = e.DBObject.GetXDataForApplication(AppName).AsArray

B)

Even if I did I was having problems when I was using .StartTransaction when I should have been using .StartOpenCloseTransaction

 

Thank you. That pointed me in the direction I needed to recap my memory.

 

 

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

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report