TheSwamp

CAD Forums => CAD General => Topic started by: diarmuid on May 19, 2004, 12:07:43 PM

Title: layer freezing question....
Post by: diarmuid on May 19, 2004, 12:07:43 PM
i have this new guy who has started with me,  he swears that you can freeze or switch off part of a layer in autocad.  can this be done? (i dont think so)  i know that there may be lisp routines that may be able to do this, if there are what/where are they.

consider the same question above, except this time we are talking about xref layers

thanks in advance
Title: layer freezing question....
Post by: Mark on May 19, 2004, 12:32:12 PM
if you want to hide someting use this.
Code: [Select]

(defun c:hidethis (/ ent obj)
  (if (setq ent (car (entsel "\nPick Object To Hide...")))
(setq obj (vlax-ename->vla-object ent))
)

  (if obj
(if
 (vlax-property-available-p obj 'Visible T)
  (vla-put-visible obj :vlax-false)
  )
)
  (princ)
  )
Title: layer freezing question....
Post by: Keith™ on May 19, 2004, 12:49:15 PM
I use the same thing except in VBA to hide/unhide particular objects
Title: layer freezing question....
Post by: diarmuid on May 19, 2004, 01:51:48 PM
thanks for the routine, it helps.

but,  its my understanding, that without the help of "non standard lisp routines" there is no way at the moment of switching/freezing part of a layer?

i need to put this new guy back in his box "so to speak"

Thanks again for the replys guys

Diarmuid
Title: layer freezing question....
Post by: Dent Cermak on May 19, 2004, 05:13:20 PM
To the best of my knowledge (Shut up T-Bear!) there is NO WAY to freeze part of a layer. The freeze command is applied to ALL of the layer. The new guy is simply full of it. Do the old "Show Me" routine on big mouth and see what happens. If he does it, bow from the waist, throw rose petals and slink back to your computer.
Title: layer freezing question....
Post by: t-bear on May 19, 2004, 05:26:15 PM
AND....let us know how he did it!
Title: layer freezing question....
Post by: Mark on May 19, 2004, 05:36:26 PM
I would like to see that myself.

BTW what are standard lisp routines ? :D
Title: layer freezing question....
Post by: Slim© on May 19, 2004, 06:57:52 PM
Hear, Hear.
Title: layer freezing question....
Post by: Trev on May 19, 2004, 10:54:27 PM
Forgive for saying this.
Dent is right   :shock:  :shock:  :shock:

 :lol:

I too would like to this wizardry.

If someone just started work with me & said "you can freeze part of a layer" My first thought would F#@%* we got somebody who thinks they know acad. I too would say "Ok show me" because their acad terminology is way out of kilta. Like Keith & mark have pointed out you can use a hide program which will change the properties of an object but that is a different animal altogether.
So unless he has his own private little stash of programs that filter for a particular objects on said layer & uses a hideme type program. Then he is blowing a little wind in your sails.

The only thing I can think of that he might be refering to is whilst in paperspace you can freeze a particular layer within a viewport yet have that layer remain visible within a second viewport. If that's what he means then his acad terminology is still out of kilta & I'd still be thinking ummm..... questionable acad skills, particularly if he has come in as an experienced acad man.


Oops I think I strayed into a venting thread.  Sorry about that.
Title: layer freezing question....
Post by: daron on May 19, 2004, 11:21:50 PM
You did mention xref's. That got me thinking. If you have a layer called nutsnbolts and another drawing xref'd in with the same layer name. You'd have two layers: nutsnbolts and drawing1|nutsnbolts. This might be considered one layer by your genius simpleton and therefore he could freeze the layer "partially". Besides Mark routine, that would be the only way I could imagine you'd be able to freeze a layer partially.
Title: layer freezing question....
Post by: diarmuid on May 20, 2004, 03:40:06 AM
thanks for the replies,

all of the replies here are all things i have been throwing around in my brain for the last day or so (you should hear the noise).

its just as i thought, this guy hasn't a clue, and soon he will feel the true power of the dark side,  he just arrived on the scene and i had to make nice with the guy because i didn't know what i was dealing with, and he may have been right, which could have made me look the fool.

so to be safe i said ok, show me what you can do, but he said that the set up here as very different from the last company....blah, blah.

i'll be keeping my eye on him.

thanks for the help, once again you guys have come to the rescue.

Later

Diarmuid
Title: layer freezing question....
Post by: diarmuid on May 20, 2004, 04:21:34 AM
standard lisp routines would the commands autocad would have so you could manipulate the drawing.  its a very loosely phrased statement, seeing as i dont really have a clue what i'm talking about, and at least if i know that much i can begin to learn :lol:
Title: layer freezing question....
Post by: Trev on May 20, 2004, 11:17:55 PM
Quote
so to be safe i said ok, show me what you can do, but he said that the set up here as very different from the last company....blah, blah

I looked in my little autocad interpritation manual and that means 'I have no idea'

Quote
standard lisp routines

no such thing as a standard lisp routine.

heheheh
you could have some fun with this new bloke if you wanted diarmuid.
Title: layer freezing question....
Post by: diarmuid on May 21, 2004, 04:44:45 AM
this is mad

this new guy has just been working on a big pharma job here in, and has been working in 2d with xrefs etc. (he's not in today)  but he's been working from inside his drawings and using refedit moving stuff around etc..etc.., no refedit here is turned off by default becuse of morons like this guy, but i know the command to turn it on, so does he! and he's after fu**ing up about 3 days work for a lot of the process and hvac guys around here and ther are not happy becaue they're trying to issue for construction.

so this ejitt arrives in a thinks he's gods gift ( but thats me of couse )  and has already caused a couple of waves.

Trev....i wont need to have fun with this guy,  he create all the fun on his own.

 :twisted:
 :lol:


Thanks guys

Diarmuid
Title: layer freezing question....
Post by: hyposmurf on May 21, 2004, 08:09:55 AM
:roll: He needs to be spoken before he makes anymore f**7 ups.Maybe you have a back up copy of the XREF on your server?Might be an idea to keep taking copies of the XREF now and then before he gets his hands on it,just so you can save the day.
Title: layer freezing question....
Post by: Keith™ on May 21, 2004, 09:49:20 AM
Well, there is a way to undefine refedit ... semi-permanently

Do this:
Hide an undefine command somewhere in the acad2000doc.lsp, acad.lsp or other file that is loaded automatically with every drawing.

Then
Code: [Select]

UNDEFINE REFEDIT
UNDEFINE REDEFINE

Then
Code: [Select]

(defun C:REFEDIT()
 (alert "REFEDIT has been disabled for security reasons")
)

(defun C:REDEFINE()
 (alert "REDEFINE has been disabled by your AutoCAD administrator")
)


The incidious thing is that once you redefine the redefine command you must enter the redefine command with the preceeding period. Perhaps he will get the message then.
You could also do other things such as create an ARX module that intercepts refedit calls and terminates the process, but it would require the object libraries from Autodesk for each version of AutoCAD you are running, you would then put the module name in acad.rx in the acadxxxx folder.

Good luck
Title: layer freezing question....
Post by: pmvliet on May 21, 2004, 12:46:06 PM
Bottom line is:
If he is the new guy, he can't be allowed to come in and upset the ship.
If he has some great ideas, that is fine as long as he goes through the proper channels to get them implemented. But if you got drawings going out that is the number 1 priority and he has to be told that.

Pieter
(standing with a baseball bat at times)
Title: layer freezing question....
Post by: Slim© on May 21, 2004, 12:51:37 PM
I agree, no matter how good you are or say you are, if you are the new guy shut up and do what the company wants you to.

Change things through the proper channels, get approval from other users and discuss it first.
Title: layer freezing question....
Post by: Trev on May 21, 2004, 09:18:48 PM
Quote
no refedit here is turned off by default becuse of morons like this guy, but i know the command to turn it on, so does he!


To add to keiths ways to skirt around the refidiot  :?
either write an Event in VBA or Reactor in Vlisp.

Use the BeginCommand event in VBA
Quote

The BeginCommand event is triggered as soon as AutoCAD receives a request to issue a command. This request can come either interactively by a user through the AutoCAD user interface or programmatically


object.BeginCommand(CommandName)

When the refedit command is issued you can turn it off & add as keith mention an alert to state it has been disable for security purposes etc etc.
Alert : "Hey New guy Stop F#%*#g with company standards & policies"

He actually sounds like a guy who knows just enough about acad to be dangerous yet not enough to know how things work.
Partial layer freeze  pfffftttttt..........   :roll:
Title: layer freezing question....
Post by: Ben on May 23, 2004, 07:11:34 AM
Just as another possibility of reigning in this "lone wolf"  If the xrefs are stored on a network drive, mark them as read only, and then have the ability to change file attributes removed from his network profile.  Then it wouldn't matter if he could turn on refedit or not.
Title: layer freezing question....
Post by: Keith™ on May 23, 2004, 07:42:11 AM
There ya go Ben .. always with the pearl of wisdom...
Title: layer freezing question....
Post by: Ben on May 23, 2004, 07:58:31 AM
Well, I guess it's better a "pearl of wisdom" than the normal "clump of ..." that I normally leave littered across forums. :D
Title: layer freezing question....
Post by: MP on May 23, 2004, 09:30:38 AM
Forgive my intrusion into this thread, but ...

DXF Code 60 | Visibility flag aside, is it possible, through lack of AutoCAD vocabulary, that "new guy" is referring to the PARTIALOAD command?

Regarding REFEDIT woes (ugh, more grief than it's worth imo) we keep each discipline's xrefs (hereafter referred to as models) in read-only directories - only a discipline's members can modify their models. Also, each discipline has a live directory (..\model) and a static directory (..\xref), "publishing" to the static directory as required. Production drawings are made by referencing static models, never live ones. Hope that made sense. It has served us well for many years.

Baring the above, if you want to prevent your cowboy (or anyone) from using REFEDIT on any model, you can set the XEDIT system variable to 0 in each model you wish to "protect". You could easily batch this operation.

Finally, while I'm not an advocate of "reactoring" a system to death, and use reactors very sparingly, sometimes you just gotta use them to track the activities of rogue cowboys to determine when a drawing went wonky and who wonkified it. To that end I employed a tracking system that monitors key activities, logging to a dictionary. ObjectDBX can then be used to read said dictionary in all drawings and update a central database (an after hours activity). I decided on the dictionary approach because I wanted to minimize server traffic during normal operating hours (we have around 250 or so CADD Designers / Operators).

Notwithstanding all of the above, at our camp, adherence to CADD Standards is a condition of employment. While we don't go around firing people for using the wrong layers etc., repeat offenders get taken to task (with "MyHistory" info in hand) and termination is always an option if they refuse to fall in line.

Hope some of this helps,

Michael (a CADD Janitor).
Title: layer freezing question....
Post by: Trev on May 23, 2004, 11:40:23 PM
Quote
drawing went wonky and who wonkified it.

Well said Michael :P  :lol:
Title: layer freezing question....
Post by: MP on May 24, 2004, 12:07:58 AM
Quote from: Trev
Quote
drawing went wonky and who wonkified it.

Well said Michael :P  :lol:
The postable version of ... well, you know :)
Title: layer freezing question....
Post by: Kate M on May 24, 2004, 10:18:30 AM
CAD Janitor...I like that... :-) I bet a lot of us spend way too much time cleaning up after other people...
Title: layer freezing question....
Post by: diarmuid on May 24, 2004, 10:23:25 AM
i seem to have stubbled on wonkified sore spot
lol
Title: layer freezing question....
Post by: Slim© on May 24, 2004, 10:39:41 AM
Quote from: Kate M
CAD Janitor...I like that... :-) I bet a lot of us spend way too much time cleaning up after other people...

Oh, so true. :)
Title: layer freezing question....
Post by: Keith™ on May 24, 2004, 10:47:52 AM
Yep, sometimes it makes more sense just to do it yourself right the first time than to spend twice as much time trying to fix the crap most people produce.
Title: layer freezing question....
Post by: diarmuid on May 24, 2004, 10:49:24 AM
and this one time, at band camp.....
Title: layer freezing question....
Post by: Slim© on May 24, 2004, 12:10:00 PM
Oh, No a mutated thread! :twisted:
Title: layer freezing question....
Post by: Trev on May 24, 2004, 11:04:05 PM
What did happen at band camp. ?
where they all wonkified too? :P