Originally Posted by
BlackBox
I'm confused.
If you want to cull the source LISP code so that your routine is not dependent on the source being loaded prior to your code's invocation, that's your choice, but as Tom has already reiterated, it's unnecessary... All you need (once the source has been loaded for that Document) is to call SSSETFIRST prior to your Command call of BURST (as is already shown in this thread twice)... It's really not this complicated.
You are very right. However, each version I've tried still returns an error. So I'm really just trying each suggestion offered. So far, I' haven't made any progress. I'm understanding each set of code, but not why it doesn't work. Whether I make my selection using SSSETFIRST then issue the BURST command, or hack away and modify the BURST.lsp to accept an argument, I still error out.
Basically, I see two methods suggested to use BURST instead of EXPLODE on my selection.
The first and simplest, using the SSSETFIRST method and calling the Burst.lsp externally:
Code:
(foreach obj
(load "burst.lsp")
(sssetfirst nil tmp)
(c:burst)
)
But returns:
Code:
Error: bad argument type: consp
The second, converting the burst.lsp into a subroutine, nested in the main code, and called by supplying an argument:
Code:
(foreach obj
(_burst2 (vlax-vla-object->ename tmp))
) ;; end foreach
But returns the same thing:
Code:
Error: bad argument type: consp
It seems either option does essentially the same thing (I agree tthe first is easier), but I can't figure out the error.