Author Topic: Bits that Bite ...  (Read 3782 times)

0 Members and 1 Guest are viewing this topic.

rkmcswain

  • Swamp Rat
  • Posts: 978
Re: Bits that Bite ...
« Reply #15 on: June 15, 2008, 07:52:45 AM »
always use this:
(setq ss (ssget '((0 . "*TEXT"))))

If so, make sure you are prepared to deal with RTEXT and any new *TEXT entities that may be created....

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Bits that Bite ...
« Reply #16 on: July 23, 2008, 02:07:50 AM »
Here's one that hurt and took a bit to find :)

I have some library code (old stuff )  to draw modular polyline shapes. The code uses 

(setq ss (ssadd))

then this sort of thing

 .. (ssadd (vlax-vla-object->ename tmp) ss)

anyhow

I was doing repeat calls to this routine and collecting the returned plines into a selection set { again using SSadd in the app' }

My selection set never contained all the entitys I expected.


Turned out that the Library routine did not have a variable SS declared local, so the (setq ss (ssadd)) in the library was wiping out the SS in the app'

To add to the misery this was only a problem because I was in dev mode with the new app variables global. ... when compiled the app was fine 'cause the app SS WAS declared local for compiling,


[ /slap kerry around the ears]





kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.