Author Topic: block isolate  (Read 16142 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: 28762
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: 28762
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: 28762
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

Dent Cermak

  • Guest
block isolate
« Reply #15 on: October 27, 2003, 10:51:48 AM »
Paper Clip ?? I just tried 3 different settings and there ain't no paper clip yet. Must have been on that page where we could clip avatars from our own computers. Where ever that went.  :lol:

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
block isolate
« Reply #16 on: October 27, 2003, 11:18:58 AM »
Sorry, I thought Hendie was talking about something else. No, there's no way to have attachments to the e-mails sent from the forum.
TheSwamp.org  (serving the CAD community since 2003)

daron

  • Guest
block isolate
« Reply #17 on: October 28, 2003, 11:59:01 AM »
Hendie, I got your dvb file. Thanks. I like it a lot. I don't know how often I'll use it, but I think it will help me learn vba.

hendie

  • Guest
block isolate
« Reply #18 on: October 31, 2003, 05:21:52 AM »
no thanks necessary but it's always nice.

I'm going to try and get back on it again. That version was just a "get it up and running" version.
Now I've had a chance to think about it, I think it should be reworked. Presently, there's no way to tell from the gui which blocks have been hidden.
I think the new version should have two list boxes, one showing non hidden blocks and the other showing hidden blocks. It would also be better if you could make multiple selections. and perhaps show the quantities of each block

gives me something to look forward to next week !

daron

  • Guest
block isolate
« Reply #19 on: October 31, 2003, 10:52:17 AM »
Good thinking.

daron

  • Guest
block isolate
« Reply #20 on: November 03, 2003, 01:00:06 PM »
Hendie, thanks for V2 of the block isolate dvb. It is much better, especially the tooltip when hovering over the copyright text, "jings crivvens... help ma boab". Something odd feeling is that any non-block objects are invisible if anything is set to invisible. Is that a design feature or oversight?

hendie

  • Guest
block isolate
« Reply #21 on: November 04, 2003, 04:03:19 AM »
Daron, I figured that "isolating blocks" meant "isolating" in the true sense i.e. leaving only the selected block(s) visible and turning everything else off.
I suppose we could always add a checkbox for "hide non-block objects" so the user could have the option of hiding all the lines,circles etc. or not.

daron

  • Guest
block isolate
« Reply #22 on: November 04, 2003, 09:17:51 AM »
That'd be cool.

hendie

  • Guest
block isolate
« Reply #23 on: November 04, 2003, 09:27:09 AM »
on it's way... check your e-mail

BTW let me know what you think or if you get any errors etc
I did the last one in a bit of a rush