Author Topic: SSX - select blocks  (Read 2322 times)

0 Members and 1 Guest are viewing this topic.

GISDUDE

  • Guest
SSX - select blocks
« on: May 23, 2013, 10:18:38 AM »
Hi guys,
I am running SSX (I have an older version from 1998) and am trying to select a block with the name "POLE MAIN". However, when I run ssx, I try to enter the block name, BUT I can't use the space bar to enter the name. It thinks I've entered the name after I've typed "POLE".

Is there a newer version of SSX I can use, that might be updated? Lee... :evil:

Many thanks,

Lee Mac

  • Seagull
  • Posts: 12915
  • London, England
Re: SSX - select blocks
« Reply #1 on: May 23, 2013, 10:34:31 AM »
In ssx.lsp on lines 154 & 169 add a t after the getstring function, e.g.:

Code - Auto/Visual Lisp: [Select]
  1. ((= t2  2)  (getstring t "\n>>Enter block name to add <RETURN to remove>: "))

You might also find this program useful by Alanjt:

http://www.theswamp.org/index.php?topic=35028.0
« Last Edit: May 23, 2013, 11:12:48 AM by Lee Mac »

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: SSX - select blocks
« Reply #2 on: May 23, 2013, 10:35:56 AM »
You might want to modify the ssx.lsp
Change all the getstring to getstring t
like
(getstring "\n>>Enter block name to add <RETURN to remove>: ")
to
(getstring  t "\n>>Enter entity type to add <RETURN to remove>: ")

PS Lee beat me to it  :P
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.

danallen

  • Guest
Re: SSX - select blocks
« Reply #3 on: May 23, 2013, 12:52:15 PM »
my version of ssx is 3.0 and has block name already, try this search:

https://www.google.com/search?q=ssx+Carl+Bethea&oq=ssx+Carl+Bethea

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: SSX - select blocks
« Reply #4 on: May 23, 2013, 01:09:39 PM »
While it's not related to the block name, I'd also recommend updating line #198 with the following line:

Code: [Select]
  (if f1 (sssetfirst nil (setq f2 (ssget "_x" f1))))
That way it will leave filtered objects selected instead of forcing you to use "P".
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

GISDUDE

  • Guest
Re: SSX - select blocks
« Reply #5 on: May 24, 2013, 09:57:57 AM »
I downloaded both lisp routines from Alanj, (thx!). The "filteredselection" file won't load. The "selectionfilter" one works perfectly, but I'd like to get the other one to work as well.

I'm wondering if my file might have a problem? I keep getting the error "unreconciled layers" when I open up this particular dwg. I have an xref I have in the background that may be causing the problem or it could be a filter. I'll experiment a little bit.

Lee/Alanj - I did modify the lines that had the "getstring" to "getstring t" - 5 lines all together. Looks like that helped a lot!

Many thanks for the help and tips.
« Last Edit: May 24, 2013, 10:20:06 AM by GISDUDE »

danallen

  • Guest
Re: SSX - select blocks
« Reply #6 on: May 24, 2013, 12:56:43 PM »
You might want to modify the ssx.lsp
Change all the getstring to getstring t
like
(getstring "\n>>Enter block name to add <RETURN to remove>: ")
to
(getstring  t "\n>>Enter entity type to add <RETURN to remove>: ")

PS Lee beat me to it  :P

Is that because the block names might have spaces?

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: SSX - select blocks
« Reply #7 on: May 24, 2013, 01:41:27 PM »
Yes the t will allow a space character in the user input.

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.