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

0 Members and 1 Guest are viewing this topic.

Hugo

  • Bull Frog
  • Posts: 431
Re: the Swamp Block Library Manager?
« Reply #75 on: February 19, 2010, 05:17:48 AM »
Hallo jbuzbe

Ein Vorgabe von Layer und Skalierung wäre noch eine Tolle sache.
sonst super Super.


One target of scaling layer and would be even sache a madwoman.
otherwise super super.

Danke

jbuzbee

  • Swamp Rat
  • Posts: 851
Re: the Swamp Block Library Manager?
« Reply #76 on: February 19, 2010, 08:25:51 AM »
Thanks Hugo, glad you like it.  I'm going to work on the tree performance issue.

Kerry, I added the form definition to your lisp file so you won't have to load the odcl file seperately.  That'a a nice little feature Owen added.  Really cleans up deployment!

James Buzbee
Windows 8

pkohut

  • Guest
Re: the Swamp Block Library Manager?
« Reply #77 on: February 19, 2010, 10:33:52 AM »
Possible speed ups - Looking at the source code and the picture at this link
http://www.theswamp.org/index.php?topic=32081.msg377241#msg377241

I think you can get rid of the file modification dates and sizes without loosing functionality, as it's just visual noise. 1) For those rare occasions when a user wants the info they can get it by other means.  2) The code to retrieve and format the display info is fairly involved. 3) How efficient are vl-file-size and vl-file-systime?  Do they do a file open and close for each operation (don't know)? If they do then this can be a very expensive operation, and more so over a network.

Having not run the application or knowing anything about OpenDCL and such, I can only guess that the directory tree is being fully populated at startup.  If this is the case then you will get a huge performance boost by only retrieving directories/sub directories info when needed, ie. by expanding a sub directory leaf.

t-bear

  • Guest
Re: the Swamp Block Library Manager?
« Reply #78 on: February 19, 2010, 11:43:58 AM »
OK...minor problem.  This keeps resetting ATTREQ and FILEDIA to "0".   :roll:

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: the Swamp Block Library Manager?
« Reply #79 on: February 19, 2010, 03:41:57 PM »
< .. >

Kerry, I added the form definition to your lisp file so you won't have to load the odcl file seperately.  That'a a nice little feature Owen added.  Really cleans up deployment!


Yes James I know about the ability to add the ASCII dialog to .LSP source. I don't do it for developments or sample code .

For anyone who wants to use this I remind you that Post #21 has the attachments for the supporting Library File and .INI Configutation File and ALSO  the Source .ODCL file if you want to make changes to the dialog.
Also note Reply #56 : the changes I've noted in that post should be made if your attributes are NOT preset and require confirmation .

I'll call this Build _08 since _07 has been used.
« Last Edit: February 19, 2010, 03:45:10 PM 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.

jbuzbee

  • Swamp Rat
  • Posts: 851
Re: the Swamp Block Library Manager?
« Reply #80 on: February 19, 2010, 04:11:15 PM »
Which one tbear, mine or Kerry's?  Mine shouldn't set any variables at all.

This is why hijacks are so problematic . . ..
James Buzbee
Windows 8

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: the Swamp Block Library Manager?
« Reply #81 on: February 19, 2010, 04:23:48 PM »
OK...minor problem.  This keeps resetting ATTREQ and FILEDIA to "0".   :roll:


Which one tbear, mine or Kerry's?  Mine shouldn't set any variables at all.

This is why hijacks are so problematic . . ..

Well that's not mine :)
Any changes I make I restore, even after errors
... and I don't set ATTREQ and FILEDIA to "0".   
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.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: the Swamp Block Library Manager?
« Reply #82 on: February 19, 2010, 06:07:54 PM »
I smell a command call.  he he he :evil:
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.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: the Swamp Block Library Manager?
« Reply #83 on: February 19, 2010, 06:27:53 PM »
When you use the command to insert a block with attributes you must address the following system variables.
Code: [Select]
;|
ATTDIA
Controls whether the -INSERT command uses a dialog box for attribute value entry. See "INSERT Command Line."
0        Issues prompts on the command line
1        Uses a dialog box

ATTMODE
Controls display of attributes.
0        Off: Makes all attributes invisible
1        Normal: Retains current visibility of each attribute: visible attributes are
                displayed; invisible attributes are not
2        On: Makes all attributes visible

ATTREQ
Determines whether the INSERT command uses default attribute settings during insertion of blocks.
0        Assumes the defaults for the values of all attributes
1        Turns on prompts or dialog box for attribute values, as specified by ATTDIA

TEXTEVAL
Controls the method of evaluation of text strings.
0        All responses to prompts for text strings and attribute values are taken literally
1        Text starting with an opening parenthesis [ ( ] or an exclamation mark (!) is
            evaluated as an AutoLISP expression, as for nontextual input
|;

(setq sysattdia (getvar "ATTDIA"))
(setq sysattreq (getvar "ATTREQ"))
(setq systxteva (getvar "TEXTEVAL"))
(setvar "ATTDIA" 0)
(setvar "ATTREQ" 0)
(setvar "TEXTEVAL" 0)


<do your lisp>


(setvar "ATTDIA"   sysattdia)
(setvar "ATTREQ"   sysattreq)
(setvar "TEXTEVAL" systxteva)

;;================================================================
;|
Alternately you can use the sys var EXPERT

EXPERT
Type: Integer
Not saved
Initial value: 0
Controls whether certain prompts are issued.

0 Issues all prompts normally.
1 Suppresses "About to regen, proceed?" and "Really want to turn the current layer off?"
2 Suppresses the preceding prompts and "Block already defined. Redefine it?" (BLOCK) and "A drawing with this name already exists. Overwrite it?" (SAVE or WBLOCK).
3 Suppresses the preceding prompts and those issued by the LINETYPE command if you try to load a linetype that's already loaded or create a new linetype in a file that already defines that linetype.

4 Suppresses the preceding prompts and those issued by UCS Save and VPORTS Save if the name you supply already exists.
5 Suppresses the prompt, "That name is already in Use, redefine it?" issued by the -DIMSTYLE Save option when you supply the name of an existing dimension style.

When a prompt is suppressed by EXPERT, the operation in question is performed as
though you  entered y  at the  prompt. Setting  EXPERT can  affect scripts, menu
macros, AutoLISP, and the command functions.

|;
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.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: the Swamp Block Library Manager?
« Reply #84 on: February 19, 2010, 06:38:13 PM »

As can be seen from post  Reply #56

(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
                    )
   )

The variables noted are stored, changed to the value nominated for the duration of the routine and the previous values are restored on termination or error.

I don't set either ATTREQ or FILEDIA to "0".
 
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.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: the Swamp Block Library Manager?
« Reply #85 on: February 19, 2010, 06:48:59 PM »
That a slick trick Kerry, haven't been following this thread much so I missed #56.  :-)
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.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: the Swamp Block Library Manager?
« Reply #86 on: February 19, 2010, 06:59:53 PM »
That a slick trick Kerry, haven't been following this thread much so I missed #56.  :-)

Yes, I like the idea.
I have my own custom routines for that and error trapping routines ... but chose not to post them, so used the ExpressTools routines instead.


added:
if you add
"CLAYER"(getvar "CLAYER")
or
something like "CLAYER" "MySpecialTextLayer"


to the list any layer changes during the procedure will nullified at termination when CLAYER is reset to the initial value
« Last Edit: February 19, 2010, 07:03:45 PM 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.

t-bear

  • Guest
Re: the Swamp Block Library Manager?
« Reply #87 on: February 22, 2010, 09:14:28 AM »
I am using what I believe is jbuzbee's original build....might be the problem.  I kinda got lost with all the builds ans stuff.  Will have to hunt up the latest installment of this and try again.

jbuzbee

  • Swamp Rat
  • Posts: 851
Re: the Swamp Block Library Manager?
« Reply #88 on: February 22, 2010, 04:33:18 PM »
The latest is in the original post - I finaaly figured out how to fully edit a post  :-P

I'm still working on the whole tree thing . . . could use some help.
James Buzbee
Windows 8

t-bear

  • Guest
Re: the Swamp Block Library Manager?
« Reply #89 on: February 23, 2010, 08:51:01 AM »
The latest is in the original post - I finaaly figured out how to fully edit a post  :-P

I'm still working on the whole tree thing . . . could use some help.

Thanks amigo, I'll reload it.
As far as helping you with this, you might have noticed....I'm worthless.....sorry.  :cry: :|