Author Topic: the Swamp Block Library Manager?  (Read 61539 times)

0 Members and 1 Guest are viewing this topic.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: the Swamp Block Library Manager?
« Reply #45 on: February 11, 2010, 07:02:02 AM »
For anyone who wants info on OpenDCL try this page http://opendcl.com/wordpress/?page_id=10

Have a look at
Quote
If you’re new to OpenDCL the “Beginners Tutorial” will walk you through creating your first project.

  • English (by: Barry Ralphs)


.. and thanks to Barry (BazzaCAD) !



« Last Edit: February 11, 2010, 07:40:45 AM by Kerry Brown »
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Hugo

  • Bull Frog
  • Posts: 431
Re: the Swamp Block Library Manager?
« Reply #46 on: February 11, 2010, 08:59:15 AM »
Hallo Kerry Brown

Der Blockmanager ist super. sollte man auf seiner Platte haben.

The block manager is great. you should have on his plate. :lol: :lol: :lol:

T.Willey

  • Needs a day job
  • Posts: 5251
Re: the Swamp Block Library Manager?
« Reply #47 on: February 11, 2010, 10:55:44 AM »
I wasn't able to look at it yet Kerry, as I don't have Acad at home at this moment.
Tim

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

Please think about donating if this post helped you.

rhino

  • Guest
Re: the Swamp Block Library Manager?
« Reply #48 on: February 11, 2010, 11:55:10 AM »
the screens I posted are of a .net program and the images are dwf files of the individual .dwg block drawings

But no chance of getting the source as it was written specifcally for our company. :roll:

jbuzbee

  • Swamp Rat
  • Posts: 851
Re: the Swamp Block Library Manager?
« Reply #49 on: February 12, 2010, 02:40:32 PM »
Ok, here it is.  It's not polished, but it works.

Notes:
1. Make sure you have OpenDCL installed (I'm using the latest Alpha)
2. Make sure the BlockManager.dat file is in AutoCAD's search path
3. Edit the dir entry in the .dat file using similar syntax.  Future versions can use the .dat file to save additional settings.
4. Once the SwampBlockmanager.lsp is loaded type "swBlockManager".  If you have edited the .dat file correctly the treeview should show all folders and subfolders to any depth.  

I'd like to consolidate many of the single service subs into larger ones - I did this to help with debugging.  I'd also like to add insert features to the .dat file: flags for prompting during insertion, etc.

Thanks to Tim, CAB, Jim Short and everyone else you provided input. In the final version I'll have a more descriptive header.

jb
« Last Edit: February 19, 2010, 07:16:27 AM by jbuzbee »
James Buzbee
Windows 8

TimSpangler

  • Water Moccasin
  • Posts: 2010
  • CAD Naked!!
Re: the Swamp Block Library Manager?
« Reply #50 on: February 12, 2010, 03:31:31 PM »
WOW jb,

looks great.  When the discussion started about a block manager I remembered that I had started on one about a year or so ago.  It was going to be my first attempt at a full blown proggy using OpenDCL.

Here is what I had to date.  Very similar to what you had.  I think I started with a demo project and started to chop it it up from there.  Needless to say, it never got finished.  Maybe I should brush off the dust and finish it up.  I would like to have it as a palette as well as a floating form.  Maybe the form could roll up just leaving the buttons at the top.  I also want to double click the block view to show a larger form with just the block view and directory.  Maybe I can add the Layer, Linetype, color boxes at the bottom with the insert button.  I like the ability it has to use the file open dialog to set the directory rather that users manually changing it.

Anyway here it is (unfinished) in case anyone wants a peeky poo.
ACA 2015 - Windows 7 Pro
All Comments and Content by TimSpangler, Copyright © 2016

T.Willey

  • Needs a day job
  • Posts: 5251
Re: the Swamp Block Library Manager?
« Reply #51 on: February 12, 2010, 04:26:36 PM »
Kerry,

Your is pretty nice, but one thing I noticed, is that you don't check the value of the system variable ' attreq '.  I inserted a block with one attribute, and the attribute value is the call to ' _.chprop '.  Just a quick test.
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: the Swamp Block Library Manager?
« Reply #52 on: February 12, 2010, 04:34:13 PM »
James,

I don't see any sub folders beside the one deep.  I didn't read any help files, just loaded and tested real quick.  :-)

Right click and left click do the same thing.

The preview window shows the current drawing when called a second time, and third time, after closing the first time in the same drawing.

Prints a ' T ' to command line, which I think can be fixed by just adding a ' princ ' to the commands it calls.  Maybe this is a desired result for testing.

Doesn't remember size/location on subsequent calls.
Tim

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

Please think about donating if this post helped you.

stevesfr

  • Newt
  • Posts: 54
Re: the Swamp Block Library Manager?
« Reply #53 on: February 12, 2010, 06:22:35 PM »
Ok, here it is.  It's not polished, but it works.

Notes:
1. Make sure you have OpenDCL installed (I'm using the latest Alpha)
2. Make sure the BlockManager.dat file is in AutoCAD's search path
3. Edit the dir entry in the .dat file using similar syntax.  Future versions can use the .dat file to save additional settings.
4. Once the SwampBlockmanager.lsp is loaded type "swBlockManager".  If you have edited the .dat file correctly the treeview should show all folders and subfolders to any depth. 

I'd like to consolidate many of the single service subs into larger ones - I did this to help with debugging.  I'd also like to add insert features to the .dat file: flags for prompting during insertion, etc.

Thanks to Tim, CAB, Jim Short and everyone else you provided input. In the final version I'll have a more descriptive header.

jb




Following is what I get when trying to run the file.

Command: appload
SwampBlockMananger.LSP successfully loaded.


Command: ; error: syntax error
Can't remember what I'm supposed to forget.

jbuzbee

  • Swamp Rat
  • Posts: 851
Re: the Swamp Block Library Manager?
« Reply #54 on: February 12, 2010, 06:52:00 PM »
This is why I hate doing this kind of stuff: worked fine here.

ALERT: for serious AutoLISP users ONLY . . ..

sorry, can't be more helpful.

jb
James Buzbee
Windows 8

T.Willey

  • Needs a day job
  • Posts: 5251
Re: the Swamp Block Library Manager?
« Reply #55 on: February 12, 2010, 07:04:09 PM »
With the latest one you posted, I was able to load the lisp without problems.  Only the small issues I saw that I mentioned in my other post.  Other than that, great job James.

I was wondering if you want to put a toggle button, or something like that, so that people can switch between blocks stored within folders, or blocks stored within drawings.  If you want something like that, then I will see how to code it up if you like, with what you have.
Tim

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

Please think about donating if this post helped you.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: the Swamp Block Library Manager?
« Reply #56 on: February 12, 2010, 09:11:16 PM »
Kerry,

Your is pretty nice, but one thing I noticed, is that you don't check the value of the system variable ' attreq '.  I inserted a block with one attribute, and the attribute value is the call to ' _.chprop '.  Just a quick test.

Thanks for looking Tim.
The attreq is easily resolved. We  just change the settings for the program specific vars for ATTREQ and ATTDIA
ie
   (acet-error-init (list (list "CMDECHO"   0
                                "expert"    5                               
                                "ATTREQ"    1
                                "ATTDIA"    1
                                "BLIPMODE"  0
                                "INSUNITS"  0
                                "OSMODE"    0
                                "PICKADD"   1
                                "PICKBOX"   5
                                "SNAPANG"   0
                                "SNAPMODE"  0                                                             
                                "SORTENTS"  1
                          )
                          0
                    )
   )

This will temporarily set these values and restore them to their prior setting on program completion.
now if the attributes are not preset the attribute value dialog will display.

Source to be uploaded :
--------------------------------
Build_07.1:2010.0213.12:05
Allow for attributes which are not preset
set app var ATTREQ to1
set app var ATTDIA to1
--------------------------------
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

jbuzbee

  • Swamp Rat
  • Posts: 851
Re: the Swamp Block Library Manager?
« Reply #57 on: February 15, 2010, 12:36:25 PM »
Thanks Tim, the toggle is a good idea, maybe Tabs?

Quote
Doesn't remember size/location on subsequent calls.

I think that's an Alpha build issue - this worked fine in the last stable release.  I'd really like to take the time to clean up the code, but as I'm a designer / problem solver, now that it's figured out I'll probably lose interest. 

Well, I hope it at least is something people can pick apart and use.

Thanks again for your help.
James Buzbee
Windows 8

T.Willey

  • Needs a day job
  • Posts: 5251
Re: the Swamp Block Library Manager?
« Reply #58 on: February 15, 2010, 01:26:30 PM »
If you give me the option in the dialog, then I'll try and see if I can get the code to show between files and folders.
Tim

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

Please think about donating if this post helped you.

jbuzbee

  • Swamp Rat
  • Posts: 851
Re: the Swamp Block Library Manager?
« Reply #59 on: February 16, 2010, 08:09:25 PM »
Tim, I'm coding that functionality now - Have a tree control bug that needs to be dealt with.  I've also changed the way the "root path" is stored: if the string in the .dat file isn't correctly formatted it throws the aforementioned "syntax error".  I've since changed this to be saved in the registry using the "selectFolder" method: thus standardizing the path "string".

Once I get everything ironed out we can continue . . . stay tuned!

This is really shaping up to be a useful tool to non-AutoLISP users.  The next step is to get some real world feedback over at the CAD general forum.

Thanks, everyone!
James Buzbee
Windows 8