Author Topic: No Show Space  (Read 7791 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: