Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Explode Command

32 REPLIES 32
Reply
Message 1 of 33
bmwm3owner
317 Views, 32 Replies

Explode Command

Hello,

I hate it when people explode hatches in my office. Is there a way so that when people go to explode a hatch, it will filter it out.

How can I write an explode routine that will ask you "are you sure you want to explode hatches" before doing so.

I wouldn't mind if when a bunch of stuff was selected, say plines, hatches, what have you, that when the user was done selecting, it would say "X amount of hatchs selected, do you want to explode them?" and if the user said "N" it will continue to explode the non-hatch enities, and if they said "Y", it will explode all.
Thanks
32 REPLIES 32
Message 2 of 33
Anonymous
in reply to: bmwm3owner

You redefine the explode command. Check out this tutorial on the Afralisp website:
http://www.afralisp.com/lispa/lisp46.htm
Message 3 of 33
Anonymous
in reply to: bmwm3owner

I would say. command reactor ssget previous-filter-hatch Prompt sendcommand removeentity ? -- Rudy@Cadentity.com AUTODESK Authorized Developer http://www.Cadentity.com MASi "sashk" wrote in message news:8141771.1088182133558.JavaMail.jive@jiveforum2... > Hello, > > I hate it when people explode hatches in my office. Is there a way so that when people go to explode a hatch, it will filter it out. > > How can I write an explode routine that will ask you "are you sure you want to explode hatches" before doing so. > > I wouldn't mind if when a bunch of stuff was selected, say plines, hatches, what have you, that when the user was done selecting, it would say "X amount of hatchs selected, do you want to explode them?" and if the user said "N" it will continue to explode the non-hatch enities, and if they said "Y", it will explode all. > Thanks
Message 4 of 33
Anonymous
in reply to: bmwm3owner

First time, a warning. Second time, pink slip. ___ "sashk" wrote in message news:8141771.1088182133558.JavaMail.jive@jiveforum2... > > I hate it when people explode hatches in my office.
Message 5 of 33
Anonymous
in reply to: bmwm3owner

I tend to favor Paul's view. It's a personnel/training/standards issue. If there is an office rule or standard, there should be a process of checking for compliance, and enforcing it, without requiring more programming work. If there isn't a standard, then it's just an issue of your preference versus theirs. Yours may make more sense, but unless you have the authority to enforce it, you are just another person arguing. In that case, it isn't legitimate for you to force your preferences by a "sneaky" method. It will only cause more argument. IMHO, CAD customizations should focus mostly on helping cooperative people to meet standards more easily and efficiently.
Message 6 of 33
Anonymous
in reply to: bmwm3owner

So what happens if a principle does it.... Although I like your idea... "Paul Turvill" wrote in message news:40dc5ce1_2@newsprd01... > First time, a warning. Second time, pink slip. > ___ > > "sashk" wrote in message > news:8141771.1088182133558.JavaMail.jive@jiveforum2... > > > > I hate it when people explode hatches in my office. > >
Message 7 of 33
bmwm3owner
in reply to: bmwm3owner

I saw the routine, but I have 2 questions.

1. If the "EXPLODE" command was undefined, how, in the routine, did the explode command work if it was already undefined? I see that the new command was called explode, but within the new command that they called "explode" there is the acad version of explode and this is what confuses me

2. How do I add hatches and dimensions to the list of objects not to be exploded because they mentioned specific block names, and not object types in this routine.

Thanks
Message 8 of 33
Anonymous
in reply to: bmwm3owner

>So what happens if a principle does it.... Then you can only try gentle persuasion & if that fails you sorta have to just get over it :-) Usually when people explode hatches it's because they don't know a better way to make an edit. And they don't understand that they're probably costing more time, when someone else needs to work in the file later. A principal ought to be responsive to the time-saving argument. Generally the better option is to erase and re-do the hatch due to a change in the drawing, as opposed to exploding and manually editing the hatch. It's not hard to show that the first method is usually faster and easier.
Message 9 of 33
Anonymous
in reply to: bmwm3owner

ha... "Tom Smith" wrote in message news:40dc8417_3@newsprd01... > >So what happens if a principle does it.... > > Then you can only try gentle persuasion & if that fails you sorta have to > just get over it :-) > > Usually when people explode hatches it's because they don't know a better > way to make an edit. And they don't understand that they're probably costing > more time, when someone else needs to work in the file later. > > A principal ought to be responsive to the time-saving argument. Generally > the better option is to erase and re-do the hatch due to a change in the > drawing, as opposed to exploding and manually editing the hatch. It's not > hard to show that the first method is usually faster and easier. > >
Message 10 of 33
Anonymous
in reply to: bmwm3owner

>ha... It's not uncommon for the most senior people to be the least CAD proficient. :-) We used to try the steer the boss toward the more glamorous front-end "design" work, which somebody else was going to re-do substantially anyway to turn it into CD's. Kept him busy enough with that to keep him mostly out of the real CD's.
Message 11 of 33
bmwm3owner
in reply to: bmwm3owner

okay, I got it to somewhat work for my blocks, but how do I add the following to the code?

1. Hatches - All of the selected hatches

2. Dimensions

3. I do not want it to just allow me to select one object, but allow me to select whatever I want, and then allow for it to see if the list of blocks was added, along with and dimension string or hatch. If it finds X amount of objects, I want it to alert me that "X amount of objects not allowed to be exploded"

Help. Attached is the code
Message 12 of 33
Anonymous
in reply to: bmwm3owner

Now that's funny.... "Tom Smith" wrote in message news:40dc8d47_3@newsprd01... > >ha... > > It's not uncommon for the most senior people to be the least CAD proficient. > 🙂 We used to try the steer the boss toward the more glamorous front-end > "design" work, which somebody else was going to re-do substantially anyway > to turn it into CD's. Kept him busy enough with that to keep him mostly out > of the real CD's. > >
Message 13 of 33
Anonymous
in reply to: bmwm3owner

>Now that's funny.... You have to do what you can, it's hard to fire the guy that signs the checks!
Message 14 of 33
Anonymous
in reply to: bmwm3owner

aint that the truth... Whats really bad is having them as your cad manager... "Tom Smith" wrote in message news:40dc908f_1@newsprd01... > >Now that's funny.... > > You have to do what you can, it's hard to fire the guy that signs the > checks! > >
Message 15 of 33
Anonymous
in reply to: bmwm3owner

That doesn't look too far off... except for the weekend approaching. Instead of just doing an entsel, do an ssget and use a while loop to do them all. If you do an ssget, you could filter for those entities right from the start, and NEVER explode a dim or a hatch. -doug "sashk" wrote in message news:9872328.1088196369119.JavaMail.jive@jiveforum2.autodesk.com... > okay, I got it to somewhat work for my blocks, but how do I add the following to the code? > > 1. Hatches - All of the selected hatches > > 2. Dimensions > > 3. I do not want it to just allow me to select one object, but allow me to select whatever I want, and then allow for it to see if the list of blocks was added, along with and dimension string or hatch. If it finds X amount of objects, I want it to alert me that "X amount of objects not allowed to be exploded" > > Help. Attached is the code
Message 16 of 33
bmwm3owner
in reply to: bmwm3owner

My problem is that I am not good enough at lisp to understand how to do that. Any ideas??

Thanks
Message 17 of 33
bmwm3owner
in reply to: bmwm3owner

maybe to make it easier, if it is a hatch, dimension, or attribute, alert "X enities not allowed to be exploded"
and the rest of the objects, such as plines, blocks, etc. can then be exploded. how do you write one of those
Message 18 of 33
Anonymous
in reply to: bmwm3owner

Hi sashk - Sorry I didn't get a chance to reply during work hours. I think this may get you moving in the right direction... Please pardon anything which appears to be 'talking down' to you. To be honest, I'm no lisp guru either, but I do know how to get some things done; not always in the cleanest most elegant way, but it does work. Which is really all we're after. (defun c:xpl ( / sset ssl n a b c d safelist) (setq safelist (list "DIMENSION" "HATCH")) ;;; you can add to this list if you want to protect blocks, etc. (princ "\nSelect entities to explode - some entity types are protected:") (setq sset (ssget)) (setq ssl (sslength sset)) (setq n ssl) (setq counter 0) (repeat ssl (setq n (1- n)) (setq a (ssname sset n)) (setq b (entget a)) (setq c (assoc 0 b)) (setq d (cdr c)) (if (not (member d safelist)) (progn (setq counter (1+ counter)) (command "explode" a "") ) ) ) (setq protected (- ssl counter)) (princ counter) (princ " entities exploded, ") (princ protected) (princ " entities protected.") (princ) ) I tried exploding all unprotected entities en masse, but I believe the 'multiple explode' command is a routine of its own, not a true basic Acad command (I may be wrong about this, but that's the way it acts). So instead I do them one at a time, and you can see watch each explosion as it's executed. Back in the days of Acad 10, there was no 'multiple explode'. One had to create a routine similar to this. I hope it's helpful, or at least gets you (or others) thinking in creative ways. -doug ps - I think all the other chat about office procedures and drawing standards belongs in another discussion group, perhaps cadmanager. "sashk" wrote in message news:11123124.1088198954468.JavaMail.jive@jiveforum2.autodesk.com... > maybe to make it easier, if it is a hatch, dimension, or attribute, alert "X enities not allowed to be exploded" > and the rest of the objects, such as plines, blocks, etc. can then be exploded. how do you write one of those
Message 19 of 33
Anonymous
in reply to: bmwm3owner

> the more glamorous front-end > "design" work, > Those must be the guys who leave off critical dimensions, etc., So the site superintendent & subcontractor personnel can "design while you build.";-) Then, of course, they get into the "construction management" business,(no doubt for a fat fee:), at which point their superintendent is prohibited from making any decisions.:) Got one o' those right now - I should re-title at least some of my structural & misc. steel erection dwgs "Thunderstorm #n," where n is the sheet no., Due to all the clouds.:):( No offense to you personally, of course, Tom.:) Heck, you are a real guy, since you are here, not on the golf course or in the cantina.:) Old saying, "You don't need to be a brain to be the boss...."
Message 20 of 33
Anonymous
in reply to: bmwm3owner

Hey, Herman! In the strip shopping center work we did there, the front end work was pretty harmless. Plunk some boxes on a site plan and see how many parking spaces you could get -- basically feasibility studies. It all got redone with greater precision anyway if it turned into a real job. Gave the boss something to do, and largely kept him out of the real drawings!

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost