TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: Harrie on May 26, 2014, 04:21:01 PM

Title: Get the vla-object of the block loaded in the blockeditor(BEDIT)
Post by: Harrie on May 26, 2014, 04:21:01 PM

Get the vla-object of the block loaded in the block editor (BEDIT)
Is this possible?

Regards.
Title: Re: Get the vla-object of the block loaded in the blockeditor(BEDIT)
Post by: irneb on May 29, 2014, 01:35:16 AM
Unfortunately I don't see any sysvar or ActiveX object which states the block object / -name opened in BEdit. I can't even see if there's anything by which to check if BEdit is active.

So my guess is - nope, not possible.

You could go an redefine the BEdit command so you can obtain the block's name. Then run the undefined ._-BEdit to open it. But that means you'd also need to recreate the dialog and the double-click functionality so it appears to the user as if nothing's changed.
Title: Re: Get the vla-object of the block loaded in the blockeditor(BEDIT)
Post by: Lee Mac on May 29, 2014, 05:48:47 PM
The only way that I see to achieve this is to iterate over the set of objects in the block editor and compare the objects to those found in all blocks defined in the drawing in order to determine which definition is being edited...  :|
Title: Re: Get the vla-object of the block loaded in the blockeditor(BEDIT)
Post by: owenwengerd on May 29, 2014, 10:41:32 PM
In ObjectARX you would use the AcApLongTransactionManager. I don't know if long transactions are exposed via COM, but that's where you would look.