Author Topic: block isolate  (Read 16023 times)

0 Members and 1 Guest are viewing this topic.

ELOQUINTET

  • Guest
block isolate
« on: October 22, 2003, 08:21:48 AM »
hey guys i am wondering if someone has a way to isolate a given block globally similar to the layer isolate function from express tools but through a dialogue box so i don't have to find the block. or if there's a way to do this with just plain acad let me know. thanks

dan

Mark

  • Custom Title
  • Seagull
  • Posts: 28753
block isolate
« Reply #1 on: October 22, 2003, 09:11:12 AM »
you could use Quick Select to isolate them.

TheSwamp.org  (serving the CAD community since 2003)

hendie

  • Guest
block isolate
« Reply #2 on: October 22, 2003, 09:41:41 AM »
or.. quick 'n'dirty with no error checking
Code: [Select]
(DEFUN C:ISOBLK (/ BBLK BLK BLKNAME CNT N)
  (setq Blkname (getstring "\nPlease enter blockname to isolate: "))
  (setq Blk
(ssget "X"
(list
 (cons -4 "<NOT")
 (cons 2 Blkname)
 (cons -4 "NOT>")
)
)
  )
  (setq Cnt (sslength blk))
  (setq n 0)
  (while (< n Cnt)
    (setq Bblk (vlax-ename->vla-object (ssname blk n)))
    (vlax-put-property Bblk 'visible 0)
    (setq n (1+ n))
  )
  (setq Blk NIL)
  (princ)
)

(DEFUN C:SEEALL (/ ALL CNT N NALL)
  (setq All (ssget "X"))
  (setq Cnt (sslength All))
  (setq n 0)
  (while (< n Cnt)
    (setq Nall (vlax-ename->vla-object (ssname All n)))
    (vlax-put-property Nall 'visible 1)
    (setq n (1+ n))
  )
  (setq All NIL)
  (princ)
)


am I doing anything here which is likely to blow up in my (or someone else's) face later ?

daron

  • Guest
block isolate
« Reply #3 on: October 22, 2003, 12:26:04 PM »
That looks great Hendie. One way to avoid errors would be to access the block table - the model and paper space blocks and return them in a form or dcl if you like to torture yourself. Trev re-wrote the express tool global attribute editor in vba for me that we might be able to grab the block access funtion and re-work it to do what is asked here or what you show in lisp.

ELOQUINTET

  • Guest
block isolate
« Reply #4 on: October 22, 2003, 03:55:01 PM »
hendie it sort of works. if the block name has no spaces it works fine but when you hit the spacebar it executes the command turning everything off. good work though it's almost there.

dan

daron

  • Guest
block isolate
« Reply #5 on: October 22, 2003, 04:12:33 PM »
Replace
Code: [Select]
(setq Blkname (getstring "\nPlease enter blockname to isolate: ")) with
Code: [Select]
(setq Blkname (getstring T "\nPlease enter blockname to isolate: ")) Then you can put spaces in.

nivuahc

  • Guest
block isolate
« Reply #6 on: October 22, 2003, 04:37:49 PM »
Why not just use the filter command?

It even let's you select one of what you're trying to filter.

hendie

  • Guest
block isolate
« Reply #7 on: October 23, 2003, 03:53:45 AM »
the QSELECT and FILTER thingies just select the items requested (am I missing something ?) and I understood isolate to mean hide everything other than the requested item(s).

Thanks for the comments Daron. I might look into a VBA version if things are quiet at work today.

daron

  • Guest
block isolate
« Reply #8 on: October 23, 2003, 10:47:11 AM »
Quote from: hendie
Thanks for the comments Daron. I might look into a VBA version if things are quiet at work today.



If/When you do, would you e-mail me a copy of it.

hendie

  • Guest
block isolate
« Reply #9 on: October 23, 2003, 10:50:22 AM »
no problem.
I was working on it today. All went well for a while then it blew up in my face so I'm starting over again. Hopefully I'll have something later next week (I finish early on a Friday :w00t:)

hendie

  • Guest
block isolate
« Reply #10 on: October 24, 2003, 07:25:11 AM »
Daron, can you PM your e-mail address to me so I can send you the DVB.
I've got an initial version working

Mark

  • Custom Title
  • Seagull
  • Posts: 28753
block isolate
« Reply #11 on: October 24, 2003, 07:58:22 AM »
Hendie, just in case you didn't know. There is a place on the swamp that you can use to upload/download files that everyone can get to. The address is http://www.theswamp.org/lilly.pond/ You can create folders, files, as well as delete them. Of course if this is a private file then you won't want to use it with out encrypting it.
TheSwamp.org  (serving the CAD community since 2003)

hendie

  • Guest
block isolate
« Reply #12 on: October 27, 2003, 04:03:58 AM »
Mark, ah.. that's interesting. Nope, I didn't know that but I do now.
Daron, I had tried e-mailing you through the swamp gui but there wasn't an option for an attachment.
I have now been enlightened !

Mark

  • Custom Title
  • Seagull
  • Posts: 28753
block isolate
« Reply #13 on: October 27, 2003, 04:12:23 AM »
Quote from: hendie
Mark, ah.. that's interesting. Nope, I didn't know that but I do now.
Daron, I had tried e-mailing you through the swamp gui but there wasn't an option for an attachment.
I have now been enlightened !

Hendie, you don't see the paperclip button?
TheSwamp.org  (serving the CAD community since 2003)

hendie

  • Guest
block isolate
« Reply #14 on: October 27, 2003, 04:51:00 AM »
eh.. ehmmn... just let me check.... Nope !

BTW I'm using the Cobalt theme