Over 1.096.000 registered users (EN+CZ).
AutoCAD tips, Inventor tips, Revit tips.
Try the new precise Engineering calculator and the updated Barcode generator.
New AutoCAD 2026 commands and variables.
Discussion forum
?CAD discussions, advices, exchange of experience

Please abide by the rules of this forum.
This is a peer-to-peer forum. The forum doesn't replace the official direct technical support provided by ARKANCE for its customers.
How to post questions: register or login, go to the specific forum and click the NEW TOPIC button.
|
Post Reply ![]() |
Author | ||||||
marian1autocad ![]() Newbie ![]() Joined: 30.Oct.2014 Location: Romania Using: Autocad2014 Status: Offline Points: 5 |
![]() Posted: 06.Feb.2015 at 19:38 |
|||||
Hi everyoane,
I have a drawing in Autocad that contains lines, text, block reference, mtext and polylines. In this drawing with Autolisp i want to do next: 1. select all polylines 2. explode them I made, and i run this in Autocad but it doesn't work: (setq pl (ssget "X" '((0 . "LWPOLYLINE")))) (command "explode" pl) What is wrong in my syntax? How can i select all polylines from a drawing, and than to explode them? Any help is appreciated. Thank you very much! |
||||||
![]() |
||||||
Kent Cooper ![]() Senior Member ![]() Joined: 12.Mar.2013 Location: United States Using: AutoCAD2020, 2023 Status: Offline Points: 686 |
![]() |
|||||
For some reason I've never seen explained, the Explode command in particular cannot Explode more than one thing at a time in a (command) function. There are at least two things you can do: 1) Step through the selection set and Explode each one individually, or 2) Mess around with the mysterious and undocumented QAFLAGS System Variable. If you Search for QAFLAGS in the AutoDesk Customization Forum, http://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/bd-p/130, you'll find various threads that talk about it and show you how to change the setting [and be sure to change it back!].
|
||||||
![]() |
||||||
marian1autocad ![]() Newbie ![]() Joined: 30.Oct.2014 Location: Romania Using: Autocad2014 Status: Offline Points: 5 |
![]() |
|||||
I will search for QAFLAGS in the AutoDesk Customization Forum and i will see what advantage can bring.
![]() Thank you Kent Cooper for your help and for your time spent here for my probleme! I appreciate. |
||||||
![]() |
||||||
criecky ![]() Newbie ![]() Joined: 02.Jun.2013 Location: Germany Using: acad 2011 - 2015 Status: Offline Points: 1 |
![]() |
|||||
hi, use
(defun c:polyexplo (/ pl) (setq pl (ssget "X" '((0 . "POLYLINE")))) (command "_explode" pl) ) |
||||||
![]() |
||||||
marian1autocad ![]() Newbie ![]() Joined: 30.Oct.2014 Location: Romania Using: Autocad2014 Status: Offline Points: 5 |
![]() |
|||||
I tried your proposal and it did not work. Thank you Criecky! Any suggestion are welcom. |
||||||
![]() |
||||||
marian1autocad ![]() Newbie ![]() Joined: 30.Oct.2014 Location: Romania Using: Autocad2014 Status: Offline Points: 5 |
![]() |
|||||
Kent Cooper gave me the solution for my problem, and i want to thank him very much. I set QAFLAGS variable to 1 (0 is default value) and after that my syntax works well. ![]() My syntax now will be: (setq a (getvar "qaflags")) (setq b (setvar "qaflags" 1)) (setq pl (ssget "X" '((0 . "LWPOLYLINE")))) (command "explode" pl "") (setvar "qaflags" a) Here ( http://www.manusoft.com/resources/acadexposed/sysvars.html ) i found this:
My problem is now solved and this topic should be closed! Thank you Kent Cooper for your help! ![]() |
||||||
![]() |
||||||
Vladimir Michl ![]() Moderator Group ![]() Arkance Systems CZ Joined: 26.Jul.2007 Location: Czech Republic Using: Autodesk software Status: Offline Points: 2121 |
![]() |
|||||
But this is the official way to do that:
|
||||||
Vladimir Michl (moderator)
ARKANCE - https://arkance.world - Autodesk Platinum Partner |
||||||
![]() |
||||||
Kent Cooper ![]() Senior Member ![]() Joined: 12.Mar.2013 Location: United States Using: AutoCAD2020, 2023 Status: Offline Points: 686 |
![]() |
|||||
... if you have a new-enough version of AutoCAD [I'm not sure in which version that was introduced]. Is the 2 there calling for a newer version of Explode that, inside a (command) function, can work with a selection set of more than one object? If so, that would also require a new-enough version of AutoCAD. Edited by Kent Cooper - 09.Feb.2015 at 15:52 |
||||||
![]() |
||||||
Kent Cooper ![]() Senior Member ![]() Joined: 12.Mar.2013 Location: United States Using: AutoCAD2020, 2023 Status: Offline Points: 686 |
![]() |
|||||
The reason that doesn't work is that the only difference from the code in the first Post [other than the (defun) wrapping] is the entity type in the selection-set filter. It will find "heavy" 2D Polylines and 3D Polylines, but not LightWeight Polylines, and it will have the same problem with the Explode command and a multiple-object selection set.
|
||||||
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
This page was generated in 0,080 seconds.