Is there a shortcut/command to turn [off / on] a specific line?

Is there a shortcut/command to turn [off / on] a specific line?

Anonymous
Not applicable
1,189 Views
6 Replies
Message 1 of 7

Is there a shortcut/command to turn [off / on] a specific line?

Anonymous
Not applicable

more or less what the tittle says.

im working on a school project where i have to turn viewpoints and drag heights over from the last viewpoint and later do it on a different angel where i use helplines, bey when i create 8 of them within a little point of area it would be nice to see my original object so i go into lines and keep turning it on and off, it would be awesome to have a way to do it with a key binding and save a little time.

 

i was thinking of a shortcut like ctrl+q to turn [named] line off / on

 

im using autocad 2015 (student version)

(sorry about my bad English its my second language)

 

thank you for your time. 😄

0 Likes
Accepted solutions (1)
1,190 Views
6 Replies
Replies (6)
Message 2 of 7

Jonathan3891
Advisor
Advisor
Accepted solution

Use the command "ISOLATEOBJECTS" then when finished used "UNISOLATE"


Jonathan Norton
Blog | Linkedin
0 Likes
Message 3 of 7

Kent1Cooper
Consultant
Consultant

Try these:

(defun C:TSO () ; = Toggle Selected Object(s)
  (if (not *TOss*) (setq *TOss* (ssget))); =  Toggle Object(s) selection set
  (if *TOhid*
    (progn ; then
      (command "_.unisolateobjects")
      (setq *TOhid* nil)
    ); progn
    (progn ; else
      (command "_.hideobjects" *TOss* "")
      (setq *TOhid* T)
    ); progn
  ); if
  (princ)
); defun

(defun C:TSON () ; = Toggle Selected Object(s) - New selection
  (setq *TOss* nil *TOhid* nil); cancel previous variables
  (C:TSO)
); defun

When you first invoke TSO, it will ask for a selection [which can be multiple objects, not just the single one in your description], and they/it will be hidden.  The next time, it will bring them back; the next, it will hide them again, etc., as many times as you want to go back and forth.

 

The TSON command is to stop doing it with a previous selection of object(s) and set a new selection.  [Alternatively, an option  to set a new selection could be put into the TSO command, but it would mean an extra step to answer a prompt every time.]

 

NOTE that the UNISOLATEOBJECTS command used there does not involve any selection, so if there are any other  things hidden with HIDEOBJECTS or ISOLATEOBJECTS, beyond the selection used in TSO, they will all come back on when this selection is brought back.

 

Load them, and you can put the TSO and TSON commands into Tool Palette buttons, or call for them with keystroke combinations, or type them in.

Kent Cooper, AIA
0 Likes
Message 4 of 7

Kent1Cooper
Consultant
Consultant

@Jonathan3891 wrote:

Use the command "ISOLATEOBJECTS" then when finished used "UNISOLATE"


[That does not address the "keep turning it on and off" aspect -- they would need to select again every time.  And the actual command name is UNISOLATEOBJECTS -- if you type in  just UNISOLATE, that's the default command alias, so you'll get it, but it won't work, for example, in an AutoLisp (command) or (vl-cmdf) function.]

Kent Cooper, AIA
0 Likes
Message 5 of 7

Sea-Haven
Mentor
Mentor

Contrary you can isolate layers multiple can be done also. Just working out best way.

 

(setq ent (entsel "pick object"))
(command "layiso" ent "")
(command "layiso" ent1 ent2 ent3 "")
(command "layuniso")

 layiso uses a entity to read layer from so would need to pick some entity maybe as part of overall routine using say (entlast) 

0 Likes
Message 6 of 7

Anonymous
Not applicable

thanks or the answer.

i will work with that command and see if it is to my liking 🙂

 

sorry for the slow replay ^^' some thing came up and i had to run.

0 Likes
Message 7 of 7

Kent1Cooper
Consultant
Consultant

@Sea-Haven wrote:

Contrary you can isolate layers .... 


This is not about Layers, but objects [read Message 1 and the Topic again].

Kent Cooper, AIA
0 Likes