Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 40

Thread: Convert Explode command to Burst command?

  1. #11
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,538
    Login to Give a bone
    0

    Default Re: Convert Explode command to Burst command?

    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.
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3630, Core i9-9900K 5.0GHz, 128GB RAM, Samsung 970 Pro M.2, 8GB NVIDIA Quadro P4000

  2. #12
    AUGI Addict alanjt's Avatar
    Join Date
    2008-02
    Posts
    1,141
    Login to Give a bone
    0

    Default Re: Convert Explode command to Burst command?

    Actually, you could just convert burst to a subroutine. change (defun c:BURST (/ ...) to (defun _burst (ent / ...

    Then comment out the BURST subroutine and the call to it (at the bottom of the routine) and just add (burst-one ent) to the bottom of the code and you should be golden.

    From there, you can apply (_burst <ename>) and you are good to go.
    Civil 3D 2017 ~ Windohz 7
    Dropbox

  3. #13
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL
    Posts
    3,400
    Login to Give a bone
    0

    Default Re: Convert Explode command to Burst command?

    Quote Originally Posted by alanjt View Post
    Actually, you could just convert burst to a subroutine. change (defun c:BURST (/ ...) to (defun _burst (ent / ...

    Then comment out the BURST subroutine and the call to it (at the bottom of the routine) and just add (burst-one ent) to the bottom of the code and you should be golden.

    From there, you can apply (_burst <ename>) and you are good to go.
    Just seems like the hard way. wouldn't:
    Code:
     (load "burst.lsp")
    (sssetfirst nil add)
    (c:burst)
    do the same thing without duplicating any copyrighted code?
    Tom Beauford P.S.M. - Civil 2020 on Windows 10 Enterprise
    Design Analysis - Leon County Public Works/Engineering Wrap [CODE] tags around selected text
    2280 Miccosukee Rd. Tallahassee, FL 32308-5310
    Ph# (850)606-1516 Home Page

  4. #14
    AUGI Addict alanjt's Avatar
    Join Date
    2008-02
    Posts
    1,141
    Login to Give a bone
    0

    Default Re: Convert Explode command to Burst command?

    Quote Originally Posted by Tom Beauford View Post
    Just seems like the hard way. wouldn't:
    Code:
     (load "burst.lsp")
    (sssetfirst nil add)
    (c:burst)
    do the same thing without duplicating any copyrighted code?
    You are correct. Perhaps I just got a little ahead of myself. I just hate calling code like that, but as long as a few checks are run beforehand, it's a fine and much less labor intensive option.
    Civil 3D 2017 ~ Windohz 7
    Dropbox

  5. #15
    Design Visualization Moderator stusic's Avatar
    Join Date
    2004-10
    Location
    Denver, Colorado
    Posts
    1,515
    Login to Give a bone
    0

    Default Re: Convert Explode command to Burst command?

    Quote Originally Posted by alanjt View Post
    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.
    Okay, I ditched the main routine, copied the rest into my routine (bypassing the need to load it), supplied my argument, but can't get it to work. I

    Code:
    Error: bad argument type: consp 1
    Code:
            (foreach obj
    		  (setvar "qaflags" 1)
    		  (sssetfirst nil tmp)
    		  (BURST-ONE tmp)
    		  (setvar "qaflags" 0)
                    )
    Phillip Bradshaw
    Lead Pixel Pusher, Lucid Design Studio
    CAD Detailer, Proctor Productions

    A doctor can bury his mistakes but an architect can only advise his clients to plant vines. - Frank Lloyd Wright

  6. #16
    AUGI Addict alanjt's Avatar
    Join Date
    2008-02
    Posts
    1,141
    Login to Give a bone
    0

    Default Re: Convert Explode command to Burst command?

    Quote Originally Posted by stusic View Post
    Okay, I ditched the main routine, copied the rest into my routine (bypassing the need to load it), supplied my argument, but can't get it to work. I

    Code:
    Error: bad argument type: consp 1
    Code:
            (foreach obj
    		  (setvar "qaflags" 1)
    		  (sssetfirst nil tmp)
    		  (BURST-ONE tmp)
    		  (setvar "qaflags" 0)
                    )
    You don't need to select the object with sssetfirst and you have to feed burst-one an ename, not a pickset, or you could just go the method Tom and BBox mentioned.
    Civil 3D 2017 ~ Windohz 7
    Dropbox

  7. #17
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL
    Posts
    3,400
    Login to Give a bone
    0

    Default Re: Convert Explode command to Burst command?

    Quote Originally Posted by alanjt View Post
    You are correct. Perhaps I just got a little ahead of myself. I just hate calling code like that, but as long as a few checks are run beforehand, it's a fine and much less labor intensive option.
    Lot of useful subrotines in Express Tools that can be called. I haven't used burst, but here's a routine that would be a lot more difficult without them.
    Code:
     ;;; ReAssHatch.lsp requires Hatchutil.lsp which came with Express Tools.
    ;;; Add boundaries & reassociate them to a selection of Hatch entities.
    ;;; by: Tom Beauford
    ;;; BeaufordT@LeonCountyFL.gov
    ;;; LEON COUNTY PUBLIC WORKS ENGINEERING SECTION
    (defun c:ReAssHatch ( / ss e# ent)
      (setq ss (ssget '((0 . "HATCH")(71 . 0)))
            e# (sslength ss)
      )
      (if(not acet-hatch-remake)(load "Hatchutil"))
      (repeat e#
        (setq e# (- e# 1))
        (acet-hatch-remake (ssname ss e#))
        (entdel (ssname ss e#))
      )
      (princ)
    )
    For any routine that requires loading another put the load in as early as you can. If it's a large file and you call one of it's functions right afterwards it may choke on itself. I use TcaseSup.lsp in a few routines for labeling text from Extended data since I hate ALLCAPS.
    Tom Beauford P.S.M. - Civil 2020 on Windows 10 Enterprise
    Design Analysis - Leon County Public Works/Engineering Wrap [CODE] tags around selected text
    2280 Miccosukee Rd. Tallahassee, FL 32308-5310
    Ph# (850)606-1516 Home Page

  8. #18
    AUGI Addict alanjt's Avatar
    Join Date
    2008-02
    Posts
    1,141
    Login to Give a bone
    0

    Default Re: Convert Explode command to Burst command?

    Quote Originally Posted by Tom Beauford View Post
    Lot of useful subrotines in Express Tools that can be called. I haven't used burst, but here's a routine that would be a lot more difficult without them.
    Code:
     ;;; ReAssHatch.lsp requires Hatchutil.lsp which came with Express Tools.
    ;;; Add boundaries & reassociate them to a selection of Hatch entities.
    ;;; by: Tom Beauford
    ;;; BeaufordT@LeonCountyFL.gov
    ;;; LEON COUNTY PUBLIC WORKS ENGINEERING SECTION
    (defun c:ReAssHatch ( / ss e# ent)
      (setq ss (ssget '((0 . "HATCH")(71 . 0)))
            e# (sslength ss)
      )
      (if(not acet-hatch-remake)(load "Hatchutil"))
      (repeat e#
        (setq e# (- e# 1))
        (acet-hatch-remake (ssname ss e#))
        (entdel (ssname ss e#))
      )
      (princ)
    )
    For any routine that requires loading another put the load in as early as you can. If it's a large file and you call one of it's functions right afterwards it may choke on itself. I use TcaseSup.lsp in a few routines for labeling text from Extended data since I hate ALLCAPS.
    Agreed. I've used (etrim <ename> <point>), from EXTRIM.lsp a few times.
    Civil 3D 2017 ~ Windohz 7
    Dropbox

  9. #19
    Design Visualization Moderator stusic's Avatar
    Join Date
    2004-10
    Location
    Denver, Colorado
    Posts
    1,515
    Login to Give a bone
    0

    Default Re: Convert Explode command to Burst command?

    Quote Originally Posted by alanjt View Post
    ... and you have to feed burst-one an ename, not a pickset....
    Excuse my ignorance, but we're wading out into the deep end of the pool. I'm not sure why I can't supply the tmp variable as the ename (I'm unclear of the difference). Here's my tmp variable:

    Code:
    (setq tmp 							;; VLA Block Reference object
                (vla-insertblock
                  spc 							;; Modelspace object
                  (vlax-3d-point ins) 					;; Insertion point
                  "M-GROUP-CSC-XML"   				;; Block name
                  1.0 1.0 1.0 0.0           				;; (Scale=1:1, Rotation=0.0)
                  ) ;; end vla-insertblock
                    )
    And here's my code as it stands now. I guess I need to know how to convert my selection set (of one block) to a single entity. Would I do this through somethign like this: (ssname tmp 0) ?

    Code:
          (foreach obj
    		  (_burst2 tmp)
                        )
    But get:
    Code:
    Nested error trapping used incorrectly.
    Resetting nesting index to 1.
    bad argument type: lentityp #<VLA-OBJECT IAcadBlockReference2 0000000082beed18>
    Phillip Bradshaw
    Lead Pixel Pusher, Lucid Design Studio
    CAD Detailer, Proctor Productions

    A doctor can bury his mistakes but an architect can only advise his clients to plant vines. - Frank Lloyd Wright

  10. #20
    AUGI Addict alanjt's Avatar
    Join Date
    2008-02
    Posts
    1,141
    Login to Give a bone
    0

    Default Re: Convert Explode command to Burst command?

    (_burst2 (vlax-vla-object->ename tmp))
    Civil 3D 2017 ~ Windohz 7
    Dropbox

Page 2 of 4 FirstFirst 1234 LastLast

Similar Threads

  1. 2014: BURST command Error
    By darrellwinfrey589074 in forum AutoCAD General
    Replies: 2
    Last Post: 2014-03-25, 02:56 PM
  2. Looking to get the BURST command in LT
    By elipman in forum AutoCAD LT - General
    Replies: 3
    Last Post: 2011-11-14, 01:19 PM
  3. 2011: HIGHLIGHT reverts to 0 after burst command?
    By stimmo520 in forum AutoCAD General
    Replies: 9
    Last Post: 2011-05-09, 01:07 PM
  4. Using the Burst command with LISP ?
    By stephen.coff in forum AutoLISP
    Replies: 16
    Last Post: 2011-02-08, 04:20 PM
  5. Modified Burst Command
    By thomas-p in forum AutoLISP
    Replies: 6
    Last Post: 2006-03-17, 02:51 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •