Author Topic: TabSort.lsp  (Read 88162 times)

0 Members and 1 Guest are viewing this topic.

Lee Mac

  • Seagull
  • Posts: 12912
  • London, England
Re: TabSort.lsp
« Reply #30 on: September 15, 2009, 10:27:33 AM »
Quote
When you say "export to single drawings" do you mean make each tab a new drawing?

Yeah, I know its a big task but this tool would then be the ultimate one stop shop for layout tabs.

That would be a big task  :lol:  I'm currently working on the Multiple Tab Selection, so I'll see if I have the time  :-)

How do you get the time to do all this code?

I'm a uni student, on my summer break at the moment, I write the code between my studies and job  :-)

jmcshane

  • Newt
  • Posts: 83
Re: TabSort.lsp
« Reply #31 on: September 15, 2009, 10:49:55 AM »
Nice one.
Keep up the good work.
John.

Civil 3D 2021. Windows 10

T.Willey

  • Needs a day job
  • Posts: 5251
Re: TabSort.lsp
« Reply #32 on: September 15, 2009, 11:08:19 AM »
Quote
When you say "export to single drawings" do you mean make each tab a new drawing?

Yeah, I know its a big task but this tool would then be the ultimate one stop shop for layout tabs.

That would be a big task  :lol:  I'm currently working on the Multiple Tab Selection, so I'll see if I have the time  :-)

This thread might help...

[ http://www.theswamp.org/index.php?topic=19721.0 ]
Tim

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

Please think about donating if this post helped you.

Lee Mac

  • Seagull
  • Posts: 12912
  • London, England
Re: TabSort.lsp
« Reply #33 on: September 15, 2009, 11:30:21 AM »
Thanks Tim - I'll check it out  :-)

Lee Mac

  • Seagull
  • Posts: 12912
  • London, England
Re: TabSort.lsp
« Reply #34 on: September 15, 2009, 05:49:52 PM »
First post now updated to include Version 1.3 now with the ability to select multiple tabs.

My sincere thanks go to Gile (and others) for his contribution to help make this a reality - related thread here

Enjoy  :-)

Lee

haustab

  • Guest
Re: TabSort.lsp
« Reply #35 on: September 16, 2009, 01:49:47 AM »
Hallo Lee Mac,
Good job… RESPECT
Thanks for sharing.

Only a button to set a selected tab active/actual.
(a small thing  :wink:)
(setvar 'ctab selectedtab)
« Last Edit: September 16, 2009, 03:06:43 AM by haustab »

Lee Mac

  • Seagull
  • Posts: 12912
  • London, England
Re: TabSort.lsp
« Reply #36 on: September 16, 2009, 05:49:37 AM »
Thanks Haustab  :-)

I have a few other ideas, and that happened to be one of them also - just gotta find space for all the buttons :-D

Lee Mac

  • Seagull
  • Posts: 12912
  • London, England
Re: TabSort.lsp
« Reply #37 on: September 16, 2009, 11:46:17 AM »
Hmm, that brings up an interesting question: I wonder if it's possible to replicate the 'copy layout' option (probably not in Lisp). I think I'll do a little research and digging.

I think you would have to manually copy all the objects from the layout space into the new layout... I don't think there would be an elegant solution to it.  :|

Just use the ' CopyObjects ' method of the document.  You might have to turn on viewports in the new layout, but you should be able to copy all content from one tab to another, even if it is one you just created.  Just make sure you don't grab the very first viewport, as that is the paperspace viewport.

Hi Tim,

I am currently attempting to add this feature to the program, but I am falling down when it comes to viewports.

When I try to filter the first viewport out, I end up with one viewport missing. But, if I do not filter out any objects, I end up with the Paperspace viewport, but still missing one of the user-drawn viewports...  :|

So, my question is, how can I tell which viewport to filter out in my:

Code: [Select]
(vlax-for Obj (vla-get-Block <layout>)
...

Advice is appreciated as always  :-)

T.Willey

  • Needs a day job
  • Posts: 5251
Re: TabSort.lsp
« Reply #38 on: September 16, 2009, 11:53:06 AM »
Hmm, that brings up an interesting question: I wonder if it's possible to replicate the 'copy layout' option (probably not in Lisp). I think I'll do a little research and digging.

I think you would have to manually copy all the objects from the layout space into the new layout... I don't think there would be an elegant solution to it.  :|

Just use the ' CopyObjects ' method of the document.  You might have to turn on viewports in the new layout, but you should be able to copy all content from one tab to another, even if it is one you just created.  Just make sure you don't grab the very first viewport, as that is the paperspace viewport.

Hi Tim,

I am currently attempting to add this feature to the program, but I am falling down when it comes to viewports.

When I try to filter the first viewport out, I end up with one viewport missing. But, if I do not filter out any objects, I end up with the Paperspace viewport, but still missing one of the user-drawn viewports...  :|

So, my question is, how can I tell which viewport to filter out in my:

Code: [Select]
(vlax-for Obj (vla-get-Block <layout>)
...

Advice is appreciated as always  :-)

The paper space viewport is the first object within the layout's block table record, so just skip the first item.

With that said, you can look at this thread for more information on viewports.  Lots of good info.
[ http://www.theswamp.org/index.php?topic=10992.0 ]

If more than a push is needed, let me know.  :wink:
Tim

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

Please think about donating if this post helped you.

Lee Mac

  • Seagull
  • Posts: 12912
  • London, England
Re: TabSort.lsp
« Reply #39 on: September 16, 2009, 01:36:09 PM »
The paper space viewport is the first object within the layout's block table record, so just skip the first item.

With that said, you can look at this thread for more information on viewports.  Lots of good info.
[ http://www.theswamp.org/index.php?topic=10992.0 ]

If more than a push is needed, let me know.  :wink:

Thats what I thought - I tried a code that skipped the first item and got the same thing...

Thanks for the link - I see that Patrick's solution towards the end of the thread is almost identical to what I had tried as well.

Lee Mac

  • Seagull
  • Posts: 12912
  • London, England
Re: TabSort.lsp
« Reply #40 on: September 16, 2009, 01:37:07 PM »
Sussed!

OK, you do need the paperspace viewport!

But I forgot that my code was reversing the Object List - after keeping the Paperspace Viewport and reversing the list, all is fine  8-)

T.Willey

  • Needs a day job
  • Posts: 5251
Re: TabSort.lsp
« Reply #41 on: September 16, 2009, 01:37:49 PM »
If you still need help, post the code.  I would think all you have to do is make one list of all the items in the layout, then use the copyobjects method on said list, and be done with it.
Tim

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

Please think about donating if this post helped you.

T.Willey

  • Needs a day job
  • Posts: 5251
Re: TabSort.lsp
« Reply #42 on: September 16, 2009, 01:38:28 PM »
Sussed!

OK, you do need the paperspace viewport!

But I forgot that my code was reversing the Object List - after keeping the Paperspace Viewport and reversing the list, all is fine  8-)

Good to hear.  It's always the small items.  " The devil is in the details. " - Whoever....
Tim

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

Please think about donating if this post helped you.

Lee Mac

  • Seagull
  • Posts: 12912
  • London, England
Re: TabSort.lsp
« Reply #43 on: September 16, 2009, 01:43:54 PM »
Sussed!

OK, you do need the paperspace viewport!

But I forgot that my code was reversing the Object List - after keeping the Paperspace Viewport and reversing the list, all is fine  8-)

Good to hear.  It's always the small items.  " The devil is in the details. " - Whoever....

So true - the feeling is great when you finally find it  8-)

Lee Mac

  • Seagull
  • Posts: 12912
  • London, England
Re: TabSort.lsp
« Reply #44 on: September 16, 2009, 02:03:42 PM »
I have updated the first post to Version 1.4

Thanks Tim for your help in making this a reality  :wink: