Hatch with Explode Overrule

Hatch with Explode Overrule

SRSDS
Advisor Advisor
626 Views
4 Replies
Message 1 of 5

Hatch with Explode Overrule

SRSDS
Advisor
Advisor

I have an overrule to prevent exploding of MLeaders.

 

On some drawings this is triggered by adding a hatch to the drawing. I suspect that when a hatch boundary is not clearly defined AutoCAD starts temporarily exploding entities to try to determine a hatch area.

 

Could this be correct?

 

I can create a variable to monitor if it's hatching and skip the overrule.

 

But wondering if there is other instances where this might happen and something I can access to know if AutoCAD is exploding things instead of the user doing it.

 

 

0 Likes
Accepted solutions (1)
627 Views
4 Replies
Replies (4)
Message 2 of 5

ActivistInvestor
Mentor
Mentor
Accepted solution

If you're referring to TransformOverrule.Explode(), I don't think it is possible to unconditionally prevent explosion of any complex entity, because exploding is required by many operations that AutoCAD performs.

 

As you correctly-surmised, when using an 'internal point' to define a hatch area in AutoCAD, it will explode complex entities (recursively if needed) as part of the boundary detection process. But, that's only the tip of the iceberg.

 

There are also other circumstances under which AutoCAD or a OOTB extension might need to temporarily-explode objects (for example, EXTEND/TRIM, computing geometric extents, etc.). Preventing exploding of  objects at the overrule-level  would most-likely result in numerous failures.

 

While you can check the active command to identify user-initiated exploding, there could be other built-in (or custom) commands that may also explode objects, making it difficult to identify the context in which an  explode is occurring.

0 Likes
Message 3 of 5

SRSDS
Advisor
Advisor

Thank you. That's very helpful.

I only want to prevent the user from exploding so checking the active command =EXPLODE is what I need. 

And just learnt how to do that here.

 

0 Likes
Message 4 of 5

ActivistInvestor
Mentor
Mentor

You may also want to investigate other '2nd and 3rd' party explode alternatives/variants ('NUKE',  XPLODE, are a few names of custom commands that come to mind).

0 Likes
Message 5 of 5

ActivistInvestor
Mentor
Mentor

You have to parse the value of the CMDNAMES sysvar. More easily, you can just read the Editor's CommandInProgress property.

0 Likes