Prompt for selection of objects within a window

Prompt for selection of objects within a window

jagostinho74
Collaborator Collaborator
953 Views
3 Replies
Message 1 of 4

Prompt for selection of objects within a window

jagostinho74
Collaborator
Collaborator

Hello,

 

I currently have a Macro (below) for exploding all the Blocks within a DWG that I would like to improve but cannot see how to do it.

 

Original macro

^C^C_QSAVE;BURST;all;;BURST;all;;BURST;all;;BURST;all;;BURST;all;;

 

I am looking for coding the following workflow:

  1. prompt for user window selection (defining a 2point rect area). extra kudos if being able to get a "Select Objects By Window" in the Command Prompt
  2. get all blocks within that 2point rect area selection
  3. run BURST command on them
  4. loop between steps 2 and 3 until no more blocks exist to explode. again, having the confirmation that no more blocks exist to explode on the Command prompt would be great

 

My thoughts are that re-selecting the blocks within a 2point rect area will address the problem of nested blocks.

 

I am a a newbie to LISP and VBA and have been looking at functions such as the SSGET and using selection sets but am unable to get the syntax in a way that works.

 

Using this line in the Macro does not seem to be working as when I try to run it it only brings up the last command run.

And the other question is how can I call the selection into the BURST command repeatedly?

 

Many thanks in advance

J

 

Assistant BIM/CAD Manager

Manchester, UK


0 Likes
Accepted solutions (1)
954 Views
3 Replies
Replies (3)
Message 2 of 4

ВeekeeCZ
Consultant
Consultant
Accepted solution

Lee's BURST HERE  does not work for you?

 

And the hint on how to change the prompt... replace this line:

Select blocks to burst:

with

Select Objects By Window: 

Message 3 of 4

jagostinho74
Collaborator
Collaborator

was unaware of this one.

Works a treat! Many thanks @ВeekeeCZ 

Assistant BIM/CAD Manager

Manchester, UK


0 Likes
Message 4 of 4

Kent1Cooper
Consultant
Consultant

The obvious way to do that in a macro is to save corners of the window into variables and use them repeatedly to select the same window area in successive Burst commands.  The points can be saved using AutoLisp (setq) functions in a macro, but using those saved points for a Window selection doesn't work inside a Burst command.  It seems to be particular to Burst [or maybe all Express Tools?] -- they can be used in [for example] a Move command.

Kent Cooper, AIA
0 Likes