TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: MSTG007 on March 16, 2005, 12:17:04 PM
-
Does anyone have a lisp which will reverse bylayer to the exact linetype and color and reset the layer to 0? or something like this?
Thanks!
-
I'm sorry I don't follow. Perhaps a little more explaining is needed. :D
-
I think it's as follows -
Say entity is on layer "MSTG007".
Entity's color and ltype are currently set to bylayer.
Said layer is set to color 42, linetype DOT2X.
I believe he wants the entity to be hard coded to color 42, ltype DOT2X.
Incidentally I think this is evil.
/opinion
-
Incidentally I think this is evil.
/opinion
Makes Se8en look saintly.
-
Incidentally I think this is evil.
I must agree with you MP, I too believe it is evil...so evil it must be eeeeeeeeeeeeeeeeviiiiiiiiilllll.
With that said, YES there is a way to do it.
CLICK HERE! (http://www.cadbrowser.com/downloads/evil.zip)
Let me know how you like it.
-
Evil? Can't it be part of exchanging drawings with clients/partners on other systems?
.. nah
-
From my experience I have to say it's pure evil. I've written utilities like this before on request for the very reason you noted Stig, but when I did it I saved the original properties so they could be restored at a later date if needed; kind of a round trip kinda thing.
But to repeat, from my point of view it's generally PURE EVIL to supply code to do this. There's a lot of CADD Operators who don't like following CADD Standards, find using layers "a pain". These folks will use a utility like this (without approval) undetected for months, creating buckets of unneccesary work for the CADD Janitors, who have to fix the drawings before they're turned over to the client.
Points of view vary, this is mine.
:)
-
partners on other systems?
That too, is evil. :)
-
i dont really like drawings that has one layer called "0" because it makes it difficult to differentiate between parts of the drawing. its just not common practice for me. but there's is one solution to that....and it is to not touch the drawing. id rather xref it and trace what i need with new layers and make that xref on a light background layer. that way i dont mess with someonelses work. but i do want to mention that this whole reversing layers to make them all to zero is nuts, i cant beleive people still do this
-
partners on other systems?
That too, is evil. :)
LOL
-
Should I then retract my EVIL program?
I agree on the evil nature, and I can't believe that people would mimic the "BENTLEY PROTOCAL"...as I would name it. Even masters of the bentley system draw everything on one layer (usually 0) and color every object differently. OR they use multiple layers and STILL color each object differently than the layer property holds.
Importing this type of mess into an AutoCAD drawing makes for a monitor throwing, CPU vs your hammer, and keyboard banging a regular practice.
But to repeat, from my point of view it's generally PURE EVIL to supply code to do this.
OK, OK, I get the hint... I will delete the zip file off of my domain...LOL
-
I'm just expressing my point of view Oz.
It's totally your call, in other words, don't feel I was pressuring you to remove it, I wasn't.
Peace.
:)
-
From my experience I have to say it's pure evil.
These folks will use a utility like this (without approval) undetected for months, creating buckets of unneccesary work for the CADD Janitors, who have to fix the drawings before they're turned over to the client.
I have a routine that is part of Autocad-Close event that resets entire dwg to bylayer everything. When my users ignore layers, they get to do the work again
-
I'm just expressing my point of view Oz.
It's totally your call, in other words, don't feel I was pressuring you to remove it, I wasn't.
Peace.
:)
Oz?!? No that is who I quote. I can't place myself in a near parsec with the great and powerful Oz! You can call me CB if'n ya want to.
I didn't feel pressured MP. I agree with you that it is pure evil to provide code that'll make headaches for everyone. Actually, I just wanted to see if I could do it. Took me all but 10 min...so I guess that would mean I just impressed myself...LOL
I was being highly sarcastic. I am bored, stuck at work, with nothing to do. So I thought I'd try my hand at humor. Sorry if I offended!
I have a routine that is part of Autocad-Close event that resets entire dwg to bylayer everything. When my users ignore layers, they get to do the work again
Hey NOW...I like that idea. Did you do that with VB for AutoCAD?
-
Makes Se8en look saintly.
*click*Bite your tongue!
-
yes, you want a copy? I did it in LISP originally, but rewrote it when I was trying to learn VBA
-
Here it is
Private Sub AcadDocument_BeginClose()
Dim objSelected As Object
Dim objSelSet As AcadSelectionSet
Dim N As Integer
On Error Resume Next
If ThisDrawing.SelectionSets.Count > 0 Then
For N = 0 To ThisDrawing.SelectionSets.Count - 1
If ThisDrawing.SelectionSets.Item(N).Name = "EBL" Then
ThisDrawing.SelectionSets("EBL").Delete
End If
Next N
End If
Set objSelSet = ThisDrawing.SelectionSets.Add("EBL")
objSelSet.Select acSelectionSetAll
For Each objSelected In objSelSet
objSelected.color = acByLayer
objSelected.Linetype = "ByLayer"
objSelected.Lineweight = acLnWtByLayer
objSelected.Update
Next
ThisDrawing.SelectionSets.Item("EBL").Delete
ZoomExtents
ThisDrawing.Application.Update
Exit_Here:
Exit Sub
End Sub
-
Whatever our thoughts on the issue, I believe that MSTG007 feels the need for this. His reasons are his own. Because WE think it's against "standards", doesn't mean that he's not forced to do this due to HIS companies "standards"...... Two choices here ... if you feel that something like this should not be propigated on the forum but you want to help MSTG007, you can send him the code via PM, e-mail, or put it in the lily for a week, then delete it. Sound reasonable?
-
I hear ya on the "See if I could do it" front, a man after me own heart.
Sorry 'bout the Ozzy confusion. LOL man, that guy doesn't have but 3 brain cells holding hands on a good day. :shock:
Crazy idea #1 ==> I invite you to share your real name, makes it friendlier when we all correspond. :)
Crazy idea#2 ==> Go here (http://theswamp.org/phpBB2/viewtopic.php?t=39) and tell us your story. :) x 2.
(Michael).
-
MSTG007 feels the need for this. His reasons are his own.
I wanted a copy to put away for that REALLY RARE instance when it might come up. I thought about writing it, but didn't have the time.
-
Whatever our thoughts on the issue, I believe that MSTG007 feels the need for this. His reasons are his own. Because WE think it's against "standards", doesn't mean that he's not forced to do this due to HIS companies "standards"...... Two choices here ... if you feel that something like this should not be propigated on the forum but you want to help MSTG007, you can send him the code via PM, e-mail, or put it in the lily for a week, then delete it. Sound reasonable?
well.....i didnt mean to not post this type of content (if you read my other post) it was one of the things i totally petpeeved...but somebody can make use of this type of bylayer thing...i would like to hear...i struggled with it...its nice to know how people handel these types of things....maybe next time i could make a better way to work in these types of situations.
-
Dubb...you beat me to the punch LOL. I was in the middle of writing this waaaay back on page 1 and some a** of an engineer came in and actually wanted me to work!! Imagine the gall! Anyhow, by the time I got back here and finished my thoughts, the post was redundant and outdated. Apologies to all.....
-
hahaa....its really slow today here at wynn engineering....and its my review today...wish me luck
-
good luck... sorry its been so long...
Reason is like t-bear said... co. standards...
they get alot of other people surveys and dwgs... they want it all to be on one layer... lord knows why. I can only tell them the truth the way and the light of cad standards...
They are more in a position of speed than of breaking out layers onto other layers... etc.
-
lol is this a LSP file or VB?
-
If you're referring to this (http://theswamp.org/phpBB2/viewtopic.php?t=4419) post, it's vba.
-
I hear ya on the "See if I could do it" front, a man after me own heart.
Sorry 'bout the Ozzy confusion. LOL man, that guy doesn't have but 3 brain cells holding hands on a good day. :shock:
Crazy idea #1 ==> I invite you to share your real name, makes it friendlier when we all correspond. :)
Crazy idea#2 ==> Go here (http://theswamp.org/phpBB2/viewtopic.php?t=39) and tell us your story. :) x 2.
(Michael).
No problem MP, you are right about his brain cells...but think about this...I know people that has 3 billion brain cells and don't even come close to the musical genius of the Oz man. Just think, if he can do all that with bearly 3 brain cells holding hands...well, he's better off than I... :)
My given name is Jeremiah, but I've been called worse (some I can't say in here :shock: )
As far as my "story", when I get more time I'll do that as well.
lol is this a LSP file or VB?
If you want the lisp version, just email me and I'll send it to you.
jeremiah.daniels@kcpl.com is the best one to use right now.
[/color]
-
Genius? Ummm, call me paranoid, and it's just a shot in the dark but me thinks mr. crowley's been barkin' at the moon from a crazy train.
:twisted:
Welcome aboard Jeremiah, enjoy the digs, pull up a chair when ya can share a tale from your diary of a madman. 'Til then see you on the other side.
PS: Fairies wear boots.