Page 4 of 4 FirstFirst 1234
Results 31 to 40 of 40

Thread: Convert Explode command to Burst command?

  1. #31
    AUGI Addict
    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
    Why does it work when I just use explode?
    It shouldn't.

    Replace all the foreach with the following:

    Code:
    (sssetfirst nil (ssadd (vlax-vla-object->ename tmp)))
    (c:burst)
    This will select a temporarily created pickset (ssget style) from the inserted block (converted from vla-object to ename) and the run burst.

  2. #32
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL USA
    Posts
    3,667
    Login to Give a bone
    0

    Default Re: Convert Explode command to Burst command?

    Try:
    Code:
     (foreach com (xins:massoc "compressor" lst) 			;; For the contents of every <compressor> tag in the <rack>
    		   
    
                      ;; Insert Block at insertion point 'ins'
      		
                    (setq ss (ssadd)
    		    tmp 							;; VLA Block Reference object
                        (vla-insertblock
                            spc 							;; Modelspace object
                            (vlax-3d-point ins) 					;; Insertion point Safearray Variant
                            "M-GROUP-CSC-XML"   					;; Block name (exists in drawing as tested earlier)
                            1.0 1.0 1.0 0.0     					;; (Scale=1:1, Rotation=0.0)
                        ) ;; end vla-insertblock
                    ) ;; end setq
                    
                    (cond
    
    		    ;;----------------------------------------------------------------------;;
                        
                        ;; Condition
                        (   (null (setq mod (xins:assoc "model" com))) ;; Contents of <model> tag
                            ;; Notify user of such:
                            (princ
                                (strcat
                                    "\nModel Number not found for Compressor located at "
                                    (xins:lst->str (mapcar 'rtos ins) ",") 				;; Include insertion point of Compressor for clarity
                                ) ;; end strcat
                            ) ;; end princ
                        ) ;; end condition
    
    		    ;;----------------------------------------------------------------------;;
    		    		    		    
                        ;; Condition
                        (   (and
    			     (setq csg (xins:assoc "suction_group" com))				;; Finds suction group of compressor
    			     (< (atoi (cadr (assoc csg rsg))) 0)					;; Sees if suction group is LT ot MT
    			     (or (= (setq csf (xins:assoc "suction_shell" com)) "NONE")			;; Determines suction filter per comp
    				 (= (setq csf (xins:assoc "suction_shell" com)) nil)
    				 )
    			)
    
                           ;; Set visibility state of block accordingly:
    			(vla-put-activelayer
      				(setq acdoc (vla-get-activedocument (vlax-get-acad-object)))
      				(vla-item (vla-get-layers acdoc) "M-PIPING-INS-1-0")
    				)
                            (xins:setvisibilitystate tmp "DIP TUBE")					 ;; Sets the visibility state
                        ) ;; end condition
    
                        ;;----------------------------------------------------------------------;;
    		 
                    ) ;; end cond
    
                    (setq tmp (vlax-vla-object->ename tmp)) ;; to entity
                    (ssadd tmp ss) ;; add to selection set
    		(sssetfirst nil ss)
    		(c:burst)
                    
    		(setq ins (mapcar '+ ins '(12.3933 0.0 0.0))) ;; Shift the insertion point by a given vector
                )

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

    Default Re: Convert Explode command to Burst command?

    Quote Originally Posted by stusic View Post
    Why does it work when I just use explode?
    Quote Originally Posted by alanjt View Post
    It shouldn't.
    The Explode method returns a variant (vla-explode), or a list (vlax-invoke <obj> 'explode) of the exploded objects as a native LispFunction Method, whereas BURST is an Express Tool and is not a native Command, Method, etc., nor does it follow the same behavior.

    Are you swapping Explode for Burst, or are you invoking burst in addition to Explode... I'm quite confused at your intent here.
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000

  4. #34
    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 BlackBox View Post
    Are you swapping Explode for Burst, or are you invoking burst in addition to Explode... I'm quite confused at your intent here.
    I'd like to swap explode for burst. The explode method worked well elsewhere in the code, but for this instance, I'd like to retain the layers the blocks are inserted on, so burst seemed like a natural choice.

  5. #35
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL USA
    Posts
    3,667
    Login to Give a bone
    0

    Default Re: Convert Explode command to Burst command?

    Quote Originally Posted by stusic View Post
    I'd like to swap explode for burst. The explode method worked well elsewhere in the code, but for this instance, I'd like to retain the layers the blocks are inserted on, so burst seemed like a natural choice.
    Wish you said that when you started the thread.

  6. #36
    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
    It shouldn't.

    Replace all the foreach with the following:

    Code:
    (sssetfirst nil (ssadd (vlax-vla-object->ename tmp)))
    (c:burst)
    This will select a temporarily created pickset (ssget style) from the inserted block (converted from vla-object to ename) and the run burst.
    Wow. Okay. That worked. After s#$dh%@cv#$s with that all day, you've helped me tremendously.

    Tom, I tried your modification as well and that also worked.

    After all this, I think the main thing that messed all this up was my use of FOREACH. Like BlackBox was referring to, it worked with the native acad commands, but didn't when a non-native command was introduced. Once I scrapped that, things got much easier.

    I can't thank you guys enough. So much help from a bunch of folks.

    And now...
    http://i.imgur.com/usvXLjR.jpeg

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

    Default Re: Convert Explode command to Burst command?

    Quote Originally Posted by Tom Beauford View Post
    Wish you said that when you started the thread.
    This.

    Quote Originally Posted by stusic View Post
    I can't thank you guys enough. So much help from a bunch of folks.
    ... Glad you got it sorted.
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000

  8. #38
    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 BlackBox View Post
    This
    Sorry, I thought I was clear, but I understand a lot gets lost when you're not actually looking at the whole picture (I also thought it'd be a quick fix).

  9. #39
    AUGI Addict
    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
    Sorry, I thought I was clear, but I understand a lot gets lost when you're not actually looking at the whole picture (I also thought it'd be a quick fix).
    lol. It rarely is.

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

    Default Re: Convert Explode command to Burst command?

    Quote Originally Posted by stusic View Post
    Sorry, I thought I was clear, but I understand a lot gets lost when you're not actually looking at the whole picture (I also thought it'd be a quick fix).
    No worries; you know I'm happy to help you, stusic... I was just reiterating the importance of the question-asker being as clear as possible from the outset... I meant no offense, of course.
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000

Page 4 of 4 FirstFirst 1234

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
  •