Why have macros been stopped from being able to hold a selection set?

Why have macros been stopped from being able to hold a selection set?

Anonymous
Not applicable
1,289 Views
12 Replies
Message 1 of 13

Why have macros been stopped from being able to hold a selection set?

Anonymous
Not applicable

Was this a deliberate change? Or a bug caused by something else?

 

Is it ever likely to be restored? Could I convince someone to put it on a list!

 

In 2013 or 14 the program allowed for macros to pick a selection and then leave them selected (highlighted with grips visible) at end of macro. This meant the user could then directly alter the properties or make another action on those objects.

 

The next release this changed so that when the same macros ran the selection set was no longer active. This meant the user has to click "Select" and "Previous" to take the same actions.

 

It seemed to slip under the radar, but it makes a big difference to our workflow and has slowed our office and similar offices down for several years since.

0 Likes
1,290 Views
12 Replies
Replies (12)
Message 2 of 13

elshawadfy
Collaborator
Collaborator

You can add to the end of the macro itself - the command "select" then "p" then enter..

This should get back your previous selection..

0 Likes
Message 3 of 13

Anonymous
Not applicable

Thanks for the response. Yeah, all our macros finish with SELECT;Previous;;

 

But a couple of releases ago it stopped working inside any macros.

 

If I then manually run the SELECT command it can pick them up.

 

But macros now end with "No Selection".

0 Likes
Message 4 of 13

elshawadfy
Collaborator
Collaborator

I'm using Autocad 2016 - and select previous works fine..

 

A simple macro is included to try..

 

(Note that you need 'One' enter after the select privious to have the selection set active)

0 Likes
Message 5 of 13

john.vellek
Alumni
Alumni

Hi @Anonymous,

 

Did the macro from @elshawadfy work for you? Please post your results so that other users might benefit.


John Vellek


Join the Autodesk Customer Council - Interact with developers, provide feedback on current and future software releases, and beta test the latest software!

Autodesk Knowledge Network | Autodesk Account | Product Feedback
0 Likes
Message 6 of 13

Anonymous
Not applicable

That is interesting - leaving only one enter after previous.

 

However, what that allows is for you to continue to edit the selection set.

 

It does not allow you to take any action on that set. You still have to right click or hit enter to complete the selection set, which immediately sets the selection but makes it inactive.

 

For example, the test is if you can change something in the properties box. If you could change the layer or the height of the text, that is what I am talking about. Or even typing a command directly like MOVE and it moves that set. As it is, since 2014, you have to use the macro to select, then type MOVE;Previous;; to take action.

 

Even if you finish the macor with MOVE;Previous; (with only one enter), you'd have to then hit enter for the selection after the macro and then still type MOVE;Previous;; to actually take the action.

 

Thanks for taking the time to reply.

0 Likes
Message 7 of 13

elshawadfy
Collaborator
Collaborator

You're welcome!

 

Sorry, it seems I could'nt convey what I wanted correctly.. You need one enter after select p is entered.. i.e.: Select (enter), P (enter), Now one more (enter) to highlight the elements --- And then stop the action recorder..

I tried running commands on the selection set afterwards, and every thing ran soothly.. Modifying the properties also, no problems.. (I'm using 2016)

If you ran the macro I uploaded you ll find the selection set still active & grips highlighted after finishing..

-------------------------------

You need Also to make sure that "PickFirst" is set to "1"..

0 Likes
Message 8 of 13

Anonymous
Not applicable

Oh, I see. You do understand what I mean. I thought you were saying the opposite.

 

I have a trial of the full version of AutoCAD 2017 currently. But I am new to the action macro side. Do I have to load this in and play it though the action recorder somehow?

 

What I a talking about is old school macros, like you'd run in a custom ribbon button or tool palette or something.

 

^C^COSMode;73;MSPACE;'-LAYER;Lock;*;Unlock;0;;_AI_SELALL;MOVE;^C^C-LAYER;Unlock;*;;JUSTIFYTEXT;Previous;;ML;SELECT;Previous;

For example, the above macro will isolate everything in layer "0" and then keep it in a live selection for editing.

 

 But in 2014 this stopped working.

0 Likes
Message 9 of 13

elshawadfy
Collaborator
Collaborator

Sorry,,, My bad,, I thought you were talking about ActionMacros...

 

As for your problem, adding anothe semi colon after ghe select previous did't work..

 

BUT

 

Replacing the entire select previous command with this lisp code worked Smiley Happy (sssetfirst nil (ssget "_P" ))

 

An example of a move macro ending with this statement:

 

^C^C^C_move;\;\\(sssetfirst nil (ssget "_P" ))

Good Luck Smiley Happy

0 Likes
Message 10 of 13

Anonymous
Not applicable

Thanks so much for your persistence.

 

I am trying to get this working in LT, so Lisp is not an option.

 

However, I am waiting to hear back from management about my recent proposal to upgrade. If that goes well I'll be checking out your Lisp first up.

0 Likes
Message 11 of 13

Anonymous
Not applicable

I still mainting that there is a bug in AutoCAD,  or at least in LT, that was introduced in about 2014/15. One release could hold a selection after a macro, the next version that just stopped. It caused us to redesign our whole workflow. I keep hoping it will be addressed in a new release.

0 Likes
Message 12 of 13

elshawadfy
Collaborator
Collaborator

Hi @Anonymous,

 

Don't mention it 🙂

 

I found out later that this works olny when the elements where selected first (before applying the macro)

An example move macro would be like this then (since the objects will be already selected..): 

 

^C^C^C_move;\\(sssetfirst nil (ssget "_P" ))

 

And I hope you succeed in your endeavor with the company 🙂

 

Good luck..

0 Likes
Message 13 of 13

elshawadfy
Collaborator
Collaborator

And @Anonymous,

 

Something else worth checking,

 

When I applied the cui command, and searched the "select previous" command, I found the code like this:

$M=$(if,$(getvar,cmdactive),,_select;)_p 

So it's using DEISL instead of a lisp statement..

You may want to check the same button in your AutoCAD see what its code is like..

 

Good luck.. 

0 Likes