Author Topic: TabSort.lsp  (Read 87505 times)

0 Members and 1 Guest are viewing this topic.

Lee Mac

  • Seagull
  • Posts: 12905
  • London, England
Re: TabSort.lsp
« Reply #90 on: September 18, 2009, 10:44:40 AM »
You're still quicker  :evil:

I wasn't sure what would be better - having the "read" in the vl-sort-i, or in the function to break the String into Numbers and Strings..  :|


CHulse

  • Swamp Rat
  • Posts: 504
Re: TabSort.lsp
« Reply #91 on: September 18, 2009, 03:38:14 PM »
Lee, Awesome tool - thanks.

Have you considered adding the ability to remove/replace an existing prefix/sufix (in addition to the add feature you have)?
Cary Hulse
Urban Forestry Manager
Wetland Studies and Solutions

Civil 3D 2020 & 2023

Hugo

  • Bull Frog
  • Posts: 422
Re: TabSort.lsp
« Reply #92 on: September 18, 2009, 04:06:26 PM »
Hallo Lee
Bekomme folgende Meldung

** DCL File Could not be Written **

Danke

Lee Mac

  • Seagull
  • Posts: 12905
  • London, England
Re: TabSort.lsp
« Reply #93 on: September 18, 2009, 04:20:18 PM »
Lee, Awesome tool - thanks.

Have you considered adding the ability to remove/replace an existing prefix/sufix (in addition to the add feature you have)?

Thanks Cary   8-)

I hadn't considered it - I suppose it would be part of the Rename function, but I am not certain as to how the user would specify what he/she wanted to remove (i.e. how would I recognise a prefix...)

Lee Mac

  • Seagull
  • Posts: 12905
  • London, England
Re: TabSort.lsp
« Reply #94 on: September 18, 2009, 04:24:57 PM »
Hallo Lee
Bekomme folgende Meldung

** DCL File Could not be Written **

Danke

Hugo,

The DCL file is written to the same location as the ACAD.PAT file - [using the sub-function at the bottom of the LISP], so my guess is that it can't find this file.

What do you get if you type this at the command line:

Code: [Select]
(findfile "ACAD.PAT")



Die DCL-Datei wird an den gleichen Ort wie die Datei geschrieben ACAD.PAT - [mit dem Sub-Funktion am Ende des LISP], so meine Vermutung ist, dass es diese Datei nicht finden kann.

Was bekommt man, wenn man diese Art in der Befehlszeile:

Code: [Select]
(findfile "ACAD.PAT")

CHulse

  • Swamp Rat
  • Posts: 504
Re: TabSort.lsp
« Reply #95 on: September 18, 2009, 04:39:53 PM »
Lee, Awesome tool - thanks.

Have you considered adding the ability to remove/replace an existing prefix/sufix (in addition to the add feature you have)?

Thanks Cary   8-)

I hadn't considered it - I suppose it would be part of the Rename function, but I am not certain as to how the user would specify what he/she wanted to remove (i.e. how would I recognise a prefix...)


Well, I don't know. But the example I have is is this:

TP1
TP2
TP3
TP4

I need to change the "TP" to "L-" for example.

Not sure how it might work though.
Cary Hulse
Urban Forestry Manager
Wetland Studies and Solutions

Civil 3D 2020 & 2023

Lee Mac

  • Seagull
  • Posts: 12905
  • London, England
Re: TabSort.lsp
« Reply #96 on: September 18, 2009, 04:59:03 PM »
Lee, Awesome tool - thanks.

Have you considered adding the ability to remove/replace an existing prefix/sufix (in addition to the add feature you have)?

Thanks Cary   8-)

I hadn't considered it - I suppose it would be part of the Rename function, but I am not certain as to how the user would specify what he/she wanted to remove (i.e. how would I recognise a prefix...)


Well, I don't know. But the example I have is is this:

TP1
TP2
TP3
TP4

I need to change the "TP" to "L-" for example.

Not sure how it might work though.

OK, I'll have a think and see what I can come up with   :-)

Aerdvark

  • Guest
Re: TabSort.lsp
« Reply #97 on: September 19, 2009, 01:14:02 AM »
Beware of remaming multiple tabs the same name ie.:
"layout01" "layout02" "layout03" minus a suffix of 2 letters will give you 3 x "layout".

Hugo

  • Bull Frog
  • Posts: 422
Re: TabSort.lsp
« Reply #98 on: September 19, 2009, 02:29:58 AM »
Hallo Lee

Sorry ivh habe es auf zwcad getestet.
Auf Autocad läuft es super.
Danke für die rasche Antwort
 :-) :-)

Lee Mac

  • Seagull
  • Posts: 12905
  • London, England
Re: TabSort.lsp
« Reply #99 on: September 19, 2009, 07:31:01 AM »
Beware of remaming multiple tabs the same name ie.:
"layout01" "layout02" "layout03" minus a suffix of 2 letters will give you 3 x "layout".


Yes - duplicate layout tabs have to be checked for in many of the other functions too  ;-)

Thanks for the warning though Marco  :-)

With this, I may just make a "Find & Replace" button, to find a textstring within a tab name, and replace it with something else  :-)

Hallo Lee

Sorry ivh habe es auf zwcad getestet.
Auf Autocad läuft es super.
Danke für die rasche Antwort
 :-) :-)

Glad we cleared that up :-)

Thanks Hugo  8-)


Lee Mac

  • Seagull
  • Posts: 12905
  • London, England
Re: TabSort.lsp
« Reply #100 on: September 19, 2009, 08:37:46 AM »
What are your thoughts on this as an addition?


Lee Mac

  • Seagull
  • Posts: 12905
  • London, England
Re: TabSort.lsp
« Reply #101 on: September 19, 2009, 01:48:03 PM »
I have updated the first post to Version 1.6 to include the Architectural Sort  8-)

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: TabSort.lsp
« Reply #102 on: September 19, 2009, 03:12:17 PM »
Thanks for all you hard work Lee.

When you select more than one tab & go to Prefix, unchecking the "Apply to All Tabs" does not
prevent renaming all the tabs.

Also crashed the routine when I copied a tab, added a prefix, reset (which also revoved the copied tab from the list but it was still in the DWG)
then I added the prefix again. When I hit DONE.

Crashed here at line 333:
Code: [Select]
               (foreach tab lst
                  (vla-put-TabOrder tab
                    (1+ (vl-position
                          (strcase (vla-get-Name tab)) dclst))))))
                         

because the name was not in the dclst & returned nil
« Last Edit: September 19, 2009, 03:15:38 PM by CAB »
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.

Lee Mac

  • Seagull
  • Posts: 12905
  • London, England
Re: TabSort.lsp
« Reply #103 on: September 19, 2009, 06:09:53 PM »
Thanks for all you hard work Lee.

When you select more than one tab & go to Prefix, unchecking the "Apply to All Tabs" does not
prevent renaming all the tabs.

Also crashed the routine when I copied a tab, added a prefix, reset (which also revoved the copied tab from the list but it was still in the DWG)
then I added the prefix again. When I hit DONE.

Crashed here at line 333:
Code: [Select]
               (foreach tab lst
                  (vla-put-TabOrder tab
                    (1+ (vl-position
                          (strcase (vla-get-Name tab)) dclst))))))
                         

because the name was not in the dclst & returned nil


Many thanks Alan for your feedback.

There have been a lot of changes to the code in a short span of time, and I haven't had a chance to fully put the routine through its paces - no doubt I have overlooked something along the way.

I shall look into the errors that you have reported  :-)

Thanks once again,

Lee


Lee Mac

  • Seagull
  • Posts: 12905
  • London, England
Re: TabSort.lsp
« Reply #104 on: September 19, 2009, 07:38:16 PM »
Alan, I have updated the first post with Version 1.6.1, which should hopefully fix the bugs you reported.  8-)

<EDIT> left a small sub-function straggling - code updated.
« Last Edit: September 19, 2009, 07:42:05 PM by Lee Mac »