Convert Explode command to Burst command?
Hello Everyone!
Quick question: Is there an easy way to convert
Code:
(foreach obj (vlax-invoke tmp 'explode))
to
Code:
(foreach obj (vlax-invoke tmp 'burst))
Or something that effectively does the same? I know I can't use the ET commands right out of the box, but I'm not sure how/if I can use it like the above.
Thank You,
-stu
Re: Convert Explode command to Burst command?
From what I've seen from others' questions, it seems I can really only feed the burst command a selection set if I modify the burst.lsp. Can anyone verify this is correct before I go wasting away the rest of the day?
Re: Convert Explode command to Burst command?
Quote:
Originally Posted by
stusic
From what I've seen from others' questions, it seems I can really only feed the burst command a selection set if I modify the burst.lsp. Can anyone verify this is correct before I go wasting away the rest of the day?
If memory serves, BURST is an Express Tool, and you need to supply an implied selection when called from code... Translation, use SSSETFIRST prior to your (command "burst") call.
Re: Convert Explode command to Burst command?
Quickly written pseudo-code (untested):
Code:
(if (and (setq oldEnt (entlast))
(setq e oldEnt)
(setq add (ssadd))
(vla-explode obj)
)
(progn
(while (setq e (entnext e))
(if (= "INSERT" (cdr (assoc 0 (entget e))))
(setq add (ssadd e add))
)
)
(sssetfirst nil add)
(c:burst)
)
)
Re: Convert Explode command to Burst command?
I haven't been able to feed BURST a selection set. I think I may have to re-write parts of the original BURST code or approach the problem from another way that just uses EXPLODE...
Re: Convert Explode command to Burst command?
If you open the burst.lsp, you can strip out the subroutines and do what you want. Don't post them, since it's all copyright material.
Re: Convert Explode command to Burst command?
Quote:
Originally Posted by
stusic
I haven't been able to feed BURST a selection set. I think I may have to re-write parts of the original BURST code or approach the problem from another way that just uses EXPLODE...
It can be done, see posts:
http://forums.augi.com/showthread.ph...ighlight=burst
http://forums.augi.com/showthread.ph...ighlight=burst
http://forums.augi.com/showthread.ph...ighlight=burst
Make sure you code includes:
Code:
(load "burst.lsp") ; doesn't autoload in lisp
(sssetfirst nil SelectionSet) ; Sets which objects are selected and gripped
(command "burst") ; bursts the SelectionSet
If that doesn't do it post the code.
Re: Convert Explode command to Burst command?
Quote:
Originally Posted by
alanjt
If you open the burst.lsp, you can strip out the subroutines and do what you want. Don't post them, since it's all copyright material.
Hmm. I see what looks pretty obvious as to what line needs to change to feed it my variable, but it's not working. Hard to trouble shoot without posting code... Where do you draw the line? Can I ask about a certain variable, maybe SS1, that seems like I could change to feed it my variable tmp? Just add tmp as a global variable?
Re: Convert Explode command to Burst command?
The burst-one subroutine is the one that will need to be applied to all enames. So the subroutine will run successfully, grab all other subroutines except the main burst one.
Re: Convert Explode command to Burst command?
You can post your code, but not code you have copied from the burst routine. That contains copyright protection.