Author Topic: Freezing Xref Layers  (Read 10163 times)

0 Members and 1 Guest are viewing this topic.

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Freezing Xref Layers
« Reply #15 on: October 11, 2006, 06:02:15 PM »
Tom, what are your LAYFRZ options set to? Entity/Block/No nesting? Not sure if it'll help, but it may be worth a try.

OPTIONS! OPTIONS! We have options? 
Say it not true. Where?
Settings really.
Quote from: Acad command line
Command: layfrz

Current settings: Viewports=Vpfreeze, Block nesting level=Block
Select an object on the layer to be frozen or [Settings/Undo]:
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

TomREd

  • Guest
Re: Freezing Xref Layers
« Reply #16 on: October 12, 2006, 08:40:48 AM »
I have tried all options and none of them made any difference....that lisp routine you spoke of that puts a string in front of all layer in the drawing, I am very intrested in.

TomREd

  • Guest
Re: Freezing Xref Layers
« Reply #17 on: October 12, 2006, 08:56:51 AM »
Allright boys and girls apperntly all i need was a cold morning a hot cup of coffee and fresh approach.

So this morning I created a new layer, made the new layer current and xrefed in the first section, then used the bind-bind command, after binding I exploded it. Well I wanted to check to see if the layer were freezable at this point so, I created a new drawing xrefed in the new file and to my amazement i was able to freeze layers. WOW!!! So to go on, I followed the same process step by step. and again to my amazement it still would freeze the layers....HOLY SHAT!!!

TO make a long story short I found a solution to my problem and its seems to be working....so I would like to thank all of you and have a wonderful rest of the day....as you can probably tell I am much ahppier this morning....


Oh yeah and most importantly----!!!! GO CARDS !!!

Krushert

  • Seagull
  • Posts: 13679
  • FREE BEER Tomorrow!!
Re: Freezing Xref Layers
« Reply #18 on: October 12, 2006, 10:28:20 AM »
I have tried all options and none of them made any difference....that lisp routine you spoke of that puts a string in front of all layer in the drawing, I am very intrested in.

As requested.  I snagged this routine from Afra-lisp site.  

TO make a long story short I found a solution to my problem and its seems to be working....so I would like to thank all of you and have a wonderful rest of the day....as you can probably tell I am much ahppier this morning....
So what was the issue and the solution???? :? :?
Please don't leave us in suspense.
I + XI = X is true ...  ... if you change your perspective.

I no longer CAD or Model, I just hang out here picking up the empties beer cans

TomREd

  • Guest
Re: Freezing Xref Layers
« Reply #19 on: October 12, 2006, 11:03:09 AM »
There were several things I changed the second time around...first of all I believe all of this was caused by haveing a # symbol in the file name...I should have know better then to do that but hey everybody makes mistakes. The other difference was not binding all the xrefs at the same time, but i believe this was just a coincidence.

I think the main factor was the file name..I'm such a dummy, I looked at # symbol when i first did it and had a feeling that may have been it but never changed it.....oh well it works fine now.

daron

  • Guest
Re: Freezing Xref Layers
« Reply #20 on: October 12, 2006, 01:12:55 PM »
<ding-ding>
Quote
...first of all I believe all of this was caused by haveing a # symbol in the file name...
I just saw this topic and while reading, all I could think of was a drawing I worked on a couple of weeks ago, where the only thing that would not freeze with my regularly used routine, were layers that contained #'s in their names. Caused me a lot of grief it did, but that was what I learned; # symbols and lisp apparently don't get along. Do any of the programming guru's understand why?

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Freezing Xref Layers
« Reply #21 on: October 12, 2006, 01:18:56 PM »
I think it is the way the code is written.  Or it could be because the '#' character can be use as a wild card match, instead of the '#' character itself.

/guesses, waiting for a guru to come along.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

daron

  • Guest
Re: Freezing Xref Layers
« Reply #22 on: October 12, 2006, 01:25:37 PM »
That would be my best guess too, but it's contained in a string. Hmm, must experiment... BBS (Be Back Soon.)

daron

  • Guest
Re: Freezing Xref Layers
« Reply #23 on: October 12, 2006, 01:31:54 PM »
Hmm. Curious. In the vlide I did this:
(setq a "343 # dfd")
It looks okay, so I inspect. It inspects okay, so I go to the command line and type !a. Lo-and-behold, it returns "343 # dfd". With all that a lisp should take that string and process it as requested, no? what gives here? Buggy program.

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Freezing Xref Layers
« Reply #24 on: October 12, 2006, 01:34:31 PM »
I would guess that the way the string is compared is the problem.  What does your part of the program look like when it is trying to freeze the layer?

Edit:
Did some testing with my routine.  I saved a drawings as 'Test#01.dwg', then xref'ed it into the current drawing.  I used my layer freeze command (posted above), and it worked fine.  Here is the output
Quote
Command: _LayFrez
Initializing...
 Select object on layer to be frozen [Undo]:
 Layer "Test#01|test" has been frozen.
 Select object on layer to be frozen [Undo]:
Then I binded it, as a bind, and here is the output
Quote
Command: _LayFrez
 Select object on layer to be frozen [Undo]:
 Layer "Test#01$0$test" has been frozen.
 Select object on layer to be frozen [Undo]:
« Last Edit: October 12, 2006, 01:38:23 PM by T.Willey »
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

daron

  • Guest
Re: Freezing Xref Layers
« Reply #25 on: October 12, 2006, 01:38:01 PM »
Quote
What does your part of the program look like when it is trying to freeze the layer?
Do you mean (command "freeze" a "")? Read on, otherwise, I'm not sure what you're asking.

Alright, tested a bit more. I changed the value of a to "343 \# dfd" and !a returns "343 # dfd". To be expected, so I type:
(command ".layer" "f" a "")
and get a return of:
No matching layer names found.

Grrr.

P.S. I also have tried this with vplayer, same results.

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Freezing Xref Layers
« Reply #26 on: October 12, 2006, 01:46:31 PM »
I think the command way will interpret it as a wildcard instead of the actually character.  Try coding it so that it isn't a command.  Here is an example of what I mean.
Quote
Command: (setq Str (value 8 ent))
"Test#01$0$test"

Command: (command "_.layer" "_Freeze" Str "")

No matching layer names found.
nil

Command: (vla-put-Freeze (vla-Item (vla-get-Layers (vla-get-ActiveDocument (vlax-get-Acad-Object))) Str) :vlax-true)
Where the last line works to freeze the layer.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Freezing Xref Layers
« Reply #27 on: October 12, 2006, 01:50:42 PM »
Try this :

Code: [Select]
Command: (setq a "343 `# dfd")
"343 `# dfd"

Command: (command ".layer" "f" a "")

Quote
`  (reverse quote)   Escapes special characters (reads next character literally)
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Freezing Xref Layers
« Reply #28 on: October 12, 2006, 01:53:27 PM »
Try this :

Code: [Select]
Command: (setq a "343 `# dfd")
"343 `# dfd"

Command: (command ".layer" "f" a "")

Quote
`  (reverse quote)   Escapes special characters (reads next character literally)
Nice one Alan!  Learned something new today.  :-D
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

daron

  • Guest
Re: Freezing Xref Layers
« Reply #29 on: October 13, 2006, 02:19:25 PM »
That's cool. Now the trick would be to have code that reads each string passed to it to find special characters, then place this before it. That or updating the working code with the vla-put-freeze should make it a bunch easier. I may have to do that. I think another job from the previous client is on the horizon and there's no telling what their layers will look like.