Author Topic: No Show Space  (Read 7790 times)

0 Members and 1 Guest are viewing this topic.

TimSpangler

  • Water Moccasin
  • Posts: 2010
  • CAD Naked!!
No Show Space
« on: September 14, 2004, 01:29:25 PM »
This is a project that I started on that came about from CATIA (If you don't know, it is a high end solid modeling package $$)

This program has what they call  Show/ NoShow Space it is sort of like freezing or turning off layers.  They disappear in to noshow.  So I thought that this would be a great idea to extend my layer routines.  I have started the coding and done a little testing but more work needs to be done.

How it works is if you have layers that are off in order to get those layers to turn on you have to open up the layer dialog and search for the layers that are off then turn them on.  My spin on this is to turn off the layers that are on and turn on the layers that are off.  Then you select the layers that you want on then when you are done it turns off the layers that were originally off and turns on the layers that were originally on as well as the layers that you just selected.  I have also changed the background color so there you can tell what is what.

The question would be do you think that tis would be a useful program?

I am thinking of having 2 types of noshow space "Off Space" "Frozen Space"

What do ya think? :roll:
ACA 2015 - Windows 7 Pro
All Comments and Content by TimSpangler, Copyright © 2016

SMadsen

  • Guest
No Show Space
« Reply #1 on: September 14, 2004, 01:49:59 PM »
Not sure what it means, Timothy
(.. but then I always need a box of crayons, a ton of paper and at least 1 hour powerpoint representation before I get any message)

Isn't this: "to turn off the layers that are on and turn on the layers that are off"
reversed by this: "it turns off the layers that were originally off and turns on the layers that were originally on"
.. so that it only turns on "the layers that you just selected"?

Why the need of a flipflop if you are only going to select layers to turn on?

TimSpangler

  • Water Moccasin
  • Posts: 2010
  • CAD Naked!!
No Show Space
« Reply #2 on: September 14, 2004, 01:54:42 PM »
Quote
Isn't this: "to turn off the layers that are on and turn on the layers that are off"
reversed by this: "it turns off the layers that were originally off and turns on the layers that were originally on"
.. so that it only turns on "the layers that you just selected"?


Yes it turns the layers that you selected as well as turn on the layers that were originally on.  It would keep from opening the layer dialog and would also allow the user the WHAT YOU SEE IS WHAT YOU GET view so he/she can select the entities that they want to see.  I will attach what I have done so far.
ACA 2015 - Windows 7 Pro
All Comments and Content by TimSpangler, Copyright © 2016

JohnK

  • Administrator
  • Seagull
  • Posts: 10626
No Show Space
« Reply #3 on: September 14, 2004, 01:55:35 PM »
Sounds cool to me.
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

JohnK

  • Administrator
  • Seagull
  • Posts: 10626
No Show Space
« Reply #4 on: September 14, 2004, 01:58:15 PM »
I think its a good idea cause of those situations that you want to see the stuff that is off and maybe turn one of those layers on. (without having to thaw/on all the layers and weed thru them again.)

Sounds good. (However i dont see it as a "high trafic" application, but it does have its validity.)
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

TimSpangler

  • Water Moccasin
  • Posts: 2010
  • CAD Naked!!
No Show Space
« Reply #5 on: September 14, 2004, 01:58:44 PM »
The link to what I have done so far.

Still has bugs and only turns on one layer at a time.  Still working on it.

http://www.theswamp.org/lilly_pond/timspangler/NoShow.lsp?nossi=1
ACA 2015 - Windows 7 Pro
All Comments and Content by TimSpangler, Copyright © 2016

TimSpangler

  • Water Moccasin
  • Posts: 2010
  • CAD Naked!!
No Show Space
« Reply #6 on: September 14, 2004, 02:02:43 PM »
Quote
(However i dont see it as a "high trafic" application, but it does have its validity.)


Yes I think that you're right about that>  I have a highlight layer routine that gets a little use but falls into that same catagory (you select a layer and it blinks 2 diferant colors for a matter of seconds.  Great for dwgs with alot of layers)
ACA 2015 - Windows 7 Pro
All Comments and Content by TimSpangler, Copyright © 2016

JohnK

  • Administrator
  • Seagull
  • Posts: 10626
No Show Space
« Reply #7 on: September 14, 2004, 03:15:24 PM »
Are you still gonna go thru with development?
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

Anonymous

  • Guest
No Show Space
« Reply #8 on: September 14, 2004, 04:46:09 PM »
Quote
Are you still gonna go thru with development?


Yes I work on it alittle each day.  Do you think I should stop?  :?

I works now sort of once I get all of the bugs out I'll post it.

JohnK

  • Administrator
  • Seagull
  • Posts: 10626
No Show Space
« Reply #9 on: September 14, 2004, 05:21:37 PM »
No, No, go thru with it.

...Check your PM box
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
No Show Space
« Reply #10 on: September 14, 2004, 06:16:17 PM »
Maybe something like this.
Modify it to suit your needs.

Code: [Select]
(defun c:NoShow(/ *error* useror useros usercmd )
  ;;==============================
  ;; error function & Routine Exit
  (defun *error* (msg)
    (if
      (not
        (member
          msg
          '("console break" "Function cancelled" "quit / exit abort" "")
        )
      )
       (princ (strcat "\nError: " msg))
    ) ; endif
   (layt); toggle layers
  ) ;end error function
 
  ;;=====================================
  ;;  Toggle Layer On/Off -  CAB 091404  
  (defun layt (/ doc lname)
   (vl-load-com) ; load ActiveX support
   (setq doc (vla-get-activedocument (vlax-get-acad-object)))
                         
   (vlax-for for-item (vla-get-layers doc);(vla-GetExtensionDictionary)
     (setq lname (vlax-get-property for-item 'Name))
     (if (eq :vlax-true
             (vlax-get-property(vla-item (vla-get-Layers doc ) lname)'LayerOn))
        (vlax-put-property (vla-item (vla-get-Layers doc) lname)
          'LayerOn :vlax-false); layer OFF
        (vlax-put-property (vla-item (vla-get-Layers doc) lname)
          'LayerOn :vlax-true); layer ON
     ); endif
   ); vlax-for
  ); defun
   
  ;;===================
  ;;  Start of Routine
  ;;===================
  (command ".undo" "begin")
  (layt); toggle layers
  (while (setq ent (entsel "\nPick object to turn on."))
    (setq lname (cdr(assoc 8 (entget (car ent)))))
    (command "._Layer" "_Off" lname "")
  ); while
  (layt); toggle layers
  (command ".undo" "end")
  (princ)
);defun
(prompt "\n*-*  NoShow loaded, Enter NoShow to run.  *-*")
(princ)
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

Crank

  • Water Moccasin
  • Posts: 1503
No Show Space
« Reply #11 on: September 14, 2004, 07:25:47 PM »
Years ago I've used Microcadam (a predecessor of Helix / CATIA). I already had forgotten this option, but this is exactly how it worked. :)

But 'undo grouping' is necessary, because otherwise a simple UNDO can be very confusing:
Code: [Select]

      .
      .
      .
  ;;===================
  ;;  Start of Routine
  ;;===================
  (command ".undo" "begin")
  (layt); toggle layers
  (while (setq ent (entsel "\nPick object to turn on."))
    (setq lname (cdr (assoc 8 (entget (car ent)))))
    (command "._Layer" "_Off" lname "")
  )
  (layt); toggle layers
  (command ".undo" "end")
  (princ)
)
Vault Professional 2023     +     AEC Collection

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
No Show Space
« Reply #12 on: September 14, 2004, 07:45:20 PM »
Good idea, I made the change.
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

JohnK

  • Administrator
  • Seagull
  • Posts: 10626
No Show Space
« Reply #13 on: September 14, 2004, 09:07:24 PM »
Tim,

I like the code sofar I havent tested it cause i dont have an autocad on this comoputer but thats just "details".

I'll help as much as i can if youl'd like.
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

Jeff_M

  • King Gator
  • Posts: 4094
  • C3D user & customizer
No Show Space
« Reply #14 on: September 14, 2004, 09:28:56 PM »
Quote from: Se7en
I'll help as much as i can if youl'd like.


Egads! I hope he doesn't ask you to be the spell checker..... :shock:  :twisted:  :lol:  :roll:

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
No Show Space
« Reply #15 on: September 14, 2004, 09:46:14 PM »
Who ever said Se7en could spell? Heck just look at his name .... who in his right mind would spell like that?
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

JohnK

  • Administrator
  • Seagull
  • Posts: 10626
No Show Space
« Reply #16 on: September 14, 2004, 10:43:50 PM »
Alright, let's see which one of you two can spell "BAN" first?!
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

TimSpangler

  • Water Moccasin
  • Posts: 2010
  • CAD Naked!!
No Show Space
« Reply #17 on: September 15, 2004, 06:52:35 AM »
Good lord, don't you guys go home at night?  I come in this morn to find a full thread.

CAB,  the code you posted works great along with Craks undo changes.  I am going to add the background color change (to show the user that he is in differant space) and I think this my be a wiener.

Thanks guys

Se7en,  I'll look into the CVS @ lunch today.  I agree that It's an invaluable resource.  I'll get back to you after to get more details.

 :D
ACA 2015 - Windows 7 Pro
All Comments and Content by TimSpangler, Copyright © 2016

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
No Show Space
« Reply #18 on: September 15, 2004, 08:18:32 AM »
We never sleep....
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

sinc

  • Guest
No Show Space
« Reply #19 on: September 15, 2004, 08:37:16 AM »
I'm just curious - what exactly are you accomplishing that the Layer Walk doesn't already do?  Layer Walk only turns layers on and off, and unfreezes all layers, which is pretty annoying.  Is that why you're writing this new routine?

That's something else that had me curious - what do you mean by "no show" space?  "Off" layers and "Frozen" layers behave differently; often you very specifically want one, and not the other (unless you work like one of my coworkers, who inexplicably always freezes AND turns off any layer he doesn't want to see on the screen at that particular moment...).  I wouldn't think you'd want to lose this distinction, so I don't get this "No Show" space...

TimSpangler

  • Water Moccasin
  • Posts: 2010
  • CAD Naked!!
No Show Space
« Reply #20 on: September 15, 2004, 08:50:31 AM »
Well i'll try to explain it better.

In CATIA there is what is know as "No Show Space".  This is like changing layout tabs (sort of) but it has the behavoir of turning a layer "Off".

It would be the place where entities go when they are turned off, thought in CATIA it isn't layer specific but entity specific.

What it allows is a "GUI", if you will, to select layers that have been turned off.  You can go into NoShow and see everything that is turned off, so you can select and entitiy to turn on instead of having to open the layer dialog and search through layer upon layer to turn one layer that you need.

For instance if you are working on a large project with 100+ layers and about 40 of them are turned off and you find that you need A-DOOR-EXST turned on you would just go to noshow and select an exsisting door and your done.

Here is the a completed version,  give it a whirl:

http://www.theswamp.org/lilly_pond/timspangler/NoShow.lsp?nossi=1

Here are links to bitmaps that I created for this program:

OffSpace:
http://www.theswamp.org/lilly_pond/timspangler/OffSpace.BMP?nossi=1

FrozenSpace:
http://www.theswamp.org/lilly_pond/timspangler/FrozenSpace.BMP?nossi=1
ACA 2015 - Windows 7 Pro
All Comments and Content by TimSpangler, Copyright © 2016

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
No Show Space
« Reply #21 on: September 15, 2004, 09:48:41 AM »
Tim, I understand perfectly....
At my previous emplyer, we had a routine that would either turn off or freeze a layer when you selected an entity on that layer. Sometimes we needed to turn those layers back on, so...along with our "FreezePick" "OffPick" and "LockPick" we had "ThawPick" "OnPick" and "UnlockPick"
The ThawPick and OnPick were really cool in that it would temporarily toggle all layer visibility and allow the user to select an object that was off/frozen and then thaw and/or turn on that layer, along with the previous layers that were on and visible.

The NoShow Space concept can be easily described as "The layers that are not visible in the drawing window" and the operation of this program can be described as the ability to pick an object that is on a frozen or off layer and turn that layer on or thaw it.
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

SMadsen

  • Guest
No Show Space
« Reply #22 on: September 15, 2004, 10:41:06 AM »
Even I am beginning to understand.

Just having skimmed the code, my only suggestions are that the error handler restores the background color and that the *error* is made local.
Restoring could for example be
Code: [Select]

(defun *error* (msg)
...
  (if (and oldbckgrndclr (/= oldbckgrndclr (GET_BCKGND_COLOR)))
    (CHANGE_BKGRND OldBckGrndClr))
...
)

V-Man

  • Bull Frog
  • Posts: 343
  • I exist therefore I am! Finally Retired!
No Show Space
« Reply #23 on: October 07, 2004, 10:50:59 AM »
Could this also work with layers that are thawed or frozen?
AutoCAD 9 - 2023, AutoCADMap 2008 - 2010, Revit 2012 - 2022, Autocad Civil 3D 2023