Author Topic: load acaddoc and acad lsp faster?  (Read 19373 times)

0 Members and 1 Guest are viewing this topic.

Lee Mac

  • Seagull
  • Posts: 12915
  • London, England
Re: load acaddoc and acad lsp faster?
« Reply #45 on: July 16, 2011, 10:38:22 AM »
You're welcome Jim.  :-)

butzers09silverado

  • Guest
Re: load acaddoc and acad lsp faster?
« Reply #46 on: July 18, 2011, 07:39:38 AM »
speaking of remedial, how did you get them sorted a -> z (alphanumeric).... thats a good one too!

Birdy

  • Guest
Re: load acaddoc and acad lsp faster?
« Reply #47 on: July 18, 2011, 08:26:46 AM »
speaking of remedial, how did you get them sorted a -> z (alphanumeric).... thats a good one too!
Why,..... the remedial way, how else! :-)
I copied in notes from the help file, just to aid me in future editing, and eliminated a few duplicated sysvars.  I also deleted newer settings (I'm still on acad 2008).
Some values I changed for my purposes, so examine before you use.
For your enjoyment:
Code: [Select]
(
  (lambda ( / err )
    (foreach x
     '(
        (acadlspasdoc 1) ; Controls whether the acad.lsp file is loaded into every drawing or just the first drawing opened in a session.
        (attmode 1) ; Controls display of attributes.
        (attreq 0) ; Controls whether INSERT uses default attribute settings during insertion of blocks.

        (blipmode 0) ; Controls whether marker blips are visible.
        (backgroundplot 3) ; Controls whether background plotting is turned on or off for plotting and publishing.

        (cecolor "bylayer") ; Sets the color of new objects. Valid values include BYLAYER, BYBLOCK, and an integer from 1 to 255.
        (celtype "bylayer") ; Sets the linetype of new objects.
        (cmddia 0) ; Controls the display of the In-Place Text Editor for the QLEADER command.
        (cmljust 0) ; Specifies multiline justification.

       
        (demandload 3) ; Specifies if and when to demand-load certain applications.
        (draworderctl 3) ; Controls the display order of overlapping objects.
       
        (elevation 0) ; Stores the current elevation of new objects relative to the current UCS.
        (expert 1) ; Controls whether certain prompts are issued.


        (fielddisplay 1) ; Controls whether fields are displayed with a gray background.
        (fieldeval 31) ; Controls how fields are updated. The setting is stored as a bitcode using the sum of the bits.

        (gridmode 0) ; Specifies whether the grid is turned on or off.
       
       
        (isavebak 1) ; Improves the speed of incremental saves, especially for large drawings.
        (isavepercent 0) ; If ISAVEPERCENT is set to 0, every save is a full save.
        (indexctl 3) ; Controls whether layer and spatial indexes are created and saved in drawing files.
        (insunits 1) ; Specifies a drawing-units value for automatic scaling of blocks, images, or xrefs inserted or attached to a drawing.

(insunitsdefsource 1) ; Sets source content units value when INSUNITS is set to 0.
        (insunitsdeftarget 1) ; Sets target drawing units value when INSUNITS is set to 0.
        (imageframe 1) ; Controls whether image frames are displayed and plotted.

        (lwdisplay 0) ; Controls whether the lineweight is displayed. The setting is saved with each tab in the drawing.
        (lwunits 1) ; Controls whether lineweight units are displayed in inches or millimeters.
        (layoutregenctl 0) ; Specifies how the display list is updated in the Model tab and layout tabs.
       
        (mirrtext 0)    ; Controls how the MIRROR command reflects text.   
        (maxsort 10000) ; Sets the maximum number of symbol names or block names sorted by listing commands.

        (offsetgaptype 0) ; Controls how potential gaps between segments are treated when closed polylines are offset.
        (osnapz 1) ; Controls whether object snaps are automatically projected onto a plane parallel to the XY plane of the current UCS at the current elevation.
        (orthomode 0) ; Constrains cursor movement to the perpendicular.

        (publishcollate 1) ; Controls whether sheets are published as a single job.
        (proxygraphics 1) ; Specifies whether images of proxy objects are saved in the drawing.
        (plinegen 0) ; Sets how linetype patterns generate around the vertices of a 2D polyline.
        (plinewid 0) ; Stores the default polyline width
        (polysides 6) ; Sets the default number of sides for the POLYGON command.

        (regenmode 1) ; Controls automatic regeneration of the drawing. See REGENAUTO command.
       
        (startup 0) ; Controls whether the Create New Drawing dialog box is displayed when a new drawing is started with NEW or QNEW.
        (ssmautoopen 0) ; Controls the display behavior of the Sheet Set Manager when a drawing associated with a sheet is opened.
        (savefidelity 1) ; Controls whether the drawing is saved with visual fidelity.  The setting is stored as a bitcode using the sum of the following values.

        (tooltips 1) ; Controls the display of tooltips on toolbars.
       
        (ucsvp 0) ; Determines whether the UCS in viewports remains fixed or changes to reflect the UCS of the current viewport.
        (ucsview 1) ; Determines whether the current UCS is saved with a named view.
(ucsfollow 0) ; Generates a plan view whenever you change from one UCS to another.

        (visretain 1) ; Controls the properties of xref-dependent layers. Controls visibility, color, linetype, lineweight, and plot styles.
(viewres 20000) ; Sets the resolution for objects in the current viewport. Integer from 1-20000.


        (xrefnotify 2) ; Controls the notification for updated or missing xrefs.
        (xloadctl 2) ; Turns xref demand-loading on and off, and controls whether it opens the referenced drawing or a copy.
        (xreftype 1) ; Controls the default reference type when attaching or overlaying an external reference.
      )
      (if (vl-catch-all-error-p (setq err (vl-catch-all-apply 'setvar x)))
        (princ (strcat "\n--> Error: " (vl-catch-all-error-message err)))
      )
    )
    (princ)
  )
)

Krushert

  • Seagull
  • Posts: 13679
  • FREE BEER Tomorrow!!
Re: load acaddoc and acad lsp faster?
« Reply #48 on: July 18, 2011, 09:23:02 AM »
I copied in notes from the help file, just to aid me in future editing ...
I do the same thing but I place this code in a external file and then have that file loaded through the user's ACADDOC.lsp file by the use of the StartUP function; allowing me to change and add system vars in one place at anytime that I need to.  Just by doing that has cut my cad management headaches in half.  :wink:
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

butzers09silverado

  • Guest
Re: load acaddoc and acad lsp faster?
« Reply #49 on: July 19, 2011, 01:53:02 PM »
I copied in notes from the help file, just to aid me in future editing ...
I do the same thing but I place this code in a external file and then have that file loaded through the user's ACADDOC.lsp file by the use of the StartUP function; allowing me to change and add system vars in one place at anytime that I need to.  Just by doing that has cut my cad management headaches in half.  :wink:

we have our cui's pointed to a unc path for our lisp files that are part of the enterprise cui.... so that me or my buddy can fix stuff on the fly this also prevents the need to "push" stuff to end users, although i'd like to know how to do that....
anyways. :mrgreen:

Krushert

  • Seagull
  • Posts: 13679
  • FREE BEER Tomorrow!!
Re: load acaddoc and acad lsp faster?
« Reply #50 on: July 19, 2011, 06:34:33 PM »
Check out this thread by Se7en. I think that is what is he teaching.  I don't know, at times it is all Greek to me.   :wink:
« Last Edit: July 19, 2011, 06:48:49 PM by Krushert »
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

Jeff H

  • Needs a day job
  • Posts: 6150
Re: load acaddoc and acad lsp faster?
« Reply #51 on: July 19, 2011, 06:41:50 PM »
Check out this thread by Se7en. I think that is what is he teaching.  I don't know, at times it is all Greek to me.   :wink:
Fix that for you

Krushert

  • Seagull
  • Posts: 13679
  • FREE BEER Tomorrow!!
Re: load acaddoc and acad lsp faster?
« Reply #52 on: July 19, 2011, 06:49:14 PM »
^ Thanks  :-)
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

Lee Mac

  • Seagull
  • Posts: 12915
  • London, England
Re: load acaddoc and acad lsp faster?
« Reply #53 on: July 19, 2011, 08:01:54 PM »
speaking of remedial, how did you get them sorted a -> z (alphanumeric).... thats a good one too!

A short bit of code to relieve the tediousness of doing it manually:

Code: [Select]
(defun _sort ( l ) (vl-sort l '(lambda ( a b ) (< (vl-prin1-to-string (car a)) (vl-prin1-to-string (car b))))))
On your list that I posted in post#29:

Code: [Select]
(_sort
 '(
    (acadlspasdoc 1)
    (blipmode 0)
    (cecolor "bylayer")
    (celtype "bylayer")
    (cmddia 1)
    (startup 1)
    (isavepercent 0)
    (tooltips 0)
    (xrefnotify 2)
    (xloadctl 2)
    (visretain 1)
    (regenmode 1)
    (attmode 1)
    (attreq 1)
    (backgroundplot 0)
    (cmljust 1)
    (demandload 3)
    (draworderctl 3)
    (elevation 0)
    (fielddisplay 1)
    (fieldeval 31)
    (gridmode 0)
    (ucsvp 0)
    (xreftype 1)
    (geomarkervisibility 0)
    (tooltips 1)
    (indexctl 3)
    (expert 5)
    (rollovertips 0)
    (publishcollate 0)
    (ssmautoopen 0)
    (osnapz 1)
    (mirrtext 0)
    (proxygraphics 0)
    (insunitsdefsource 2)
    (insunitsdeftarget 2)
    (maxsort 10000)
    (isavebak 1)
    (isavepercent 1)
    (offsetgaptype 0)
    (savefidelity 0)
    (plinegen 0)
    (plinewid 0)
    (polysides 3)
    (ucsfollow 0)
    (rasterthreshold 100)
    (rasterpercent 90)
    (elevation 0)
    (imageframe 2)
    (geomarkervisibility 0)
    (navvcubedisplay 0)
    (navbardisplay 0)
    (lwdisplay 0)
    (gridmode 0)
    (lwunits 0)
    (orthomode 0)
    (layoutregenctl 0)
    (hpglmode 1)
    (layerdlgmode 0)
  )
)

Returns the sorted list:

Code: [Select]
(
  (ACADLSPASDOC 1)
  (ATTMODE 1)
  (ATTREQ 1)
  (BACKGROUNDPLOT 0)
  (BLIPMODE 0)
  (CECOLOR "bylayer")
  (CELTYPE "bylayer")
  (CMDDIA 1)
  (CMLJUST 1)
  (DEMANDLOAD 3)
  (DRAWORDERCTL 3)
  (ELEVATION 0)
  (ELEVATION 0)
  (EXPERT 5)
  (FIELDDISPLAY 1)
  (FIELDEVAL 31)
  (GEOMARKERVISIBILITY 0)
  (GEOMARKERVISIBILITY 0)
  (GRIDMODE 0)
  (GRIDMODE 0)
  (HPGLMODE 1)
  (IMAGEFRAME 2)
  (INDEXCTL 3)
  (INSUNITSDEFSOURCE 2)
  (INSUNITSDEFTARGET 2)
  (ISAVEBAK 1)
  (ISAVEPERCENT 0)
  (ISAVEPERCENT 1)
  (LAYERDLGMODE 0)
  (LAYOUTREGENCTL 0)
  (LWDISPLAY 0)
  (LWUNITS 0)
  (MAXSORT 10000)
  (MIRRTEXT 0)
  (NAVBARDISPLAY 0)
  (NAVVCUBEDISPLAY 0)
  (OFFSETGAPTYPE 0)
  (ORTHOMODE 0)
  (OSNAPZ 1)
  (PLINEGEN 0)
  (PLINEWID 0)
  (POLYSIDES 3)
  (PROXYGRAPHICS 0)
  (PUBLISHCOLLATE 0)
  (RASTERPERCENT 90)
  (RASTERTHRESHOLD 100)
  (REGENMODE 1)
  (ROLLOVERTIPS 0)
  (SAVEFIDELITY 0)
  (SSMAUTOOPEN 0)
  (STARTUP 1)
  (TOOLTIPS 0)
  (TOOLTIPS 1)
  (UCSFOLLOW 0)
  (UCSVP 0)
  (VISRETAIN 1)
  (XLOADCTL 2)
  (XREFNOTIFY 2)
  (XREFTYPE 1)
)

 :-)

JohnK

  • Administrator
  • Seagull
  • Posts: 10648
Re: load acaddoc and acad lsp faster?
« Reply #54 on: July 19, 2011, 09:13:17 PM »
I copied in notes from the help file, just to aid me in future editing ...
I do the same thing but I place this code in a external file and then have that file loaded through the user's ACADDOC.lsp file by the use of the StartUP function; allowing me to change and add system vars in one place at anytime that I need to.  Just by doing that has cut my cad management headaches in half.  :wink:
we have our cui's pointed to a unc path for our lisp files that are part of the enterprise cui.... so that me or my buddy can fix stuff on the fly this also prevents the need to "push" stuff to end users, although i'd like to know how to do that....
anyways. :mrgreen:
Check out this thread by Se7en. I think that is what is he teaching.  I don't know, at times it is all Greek to me.   :wink:

I set my office up similar to what butzers09silverado describes (keep as much stuff on the network as possible) but i do still have to install some things like updates to custom company software, replace a DLL, or even install new or updated programs, i need the power that an installer offers; sometimes a BAT or LSP file just doesn't cut it.

NSIS (that link) is an installer compiler (It makes installers). I use the NSIS installer language to write a "program" which i compile into an installer (You know what an installer is, Its the thing you download when you want to install a program...it asks you all those annoying questions like: do you agree, install this or that component, install this here, etc., etc.).

Does that help make `it' less `Greek'?
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

jaydee

  • Guest
Re: load acaddoc and acad lsp faster?
« Reply #55 on: July 19, 2011, 10:06:47 PM »
Hi.
Just wondering anyone still use menus.
Menus and toolbars is something that that im getting use to and a must for any professional drafters.
In a multi-discipline trade, each have their own menu, and each section have their own setup.

What i do is having all their lisp and vars loaded from
.MNL file (this file will automaticall load with the associate .CUI/CUIX file)

Therefore each menu will have their own lisp and var settings.

My experience is that some default setting is good for you, but might not be likened by others.
eg
REMEMBERFOLDERS setting
some people are still prefer one way or the other.




butzers09silverado

  • Guest
Re: load acaddoc and acad lsp faster?
« Reply #56 on: July 20, 2011, 07:59:57 AM »
speaking of remedial, how did you get them sorted a -> z (alphanumeric).... thats a good one too!

A short bit of code to relieve the tediousness of doing it manually:

Code: [Select]
(defun _sort ( l ) (vl-sort l '(lambda ( a b ) (< (vl-prin1-to-string (car a)) (vl-prin1-to-string (car b))))))
On your list that I posted in post#29:

Code: [Select]
(_sort
 '(
    (acadlspasdoc 1)
    (blipmode 0)
    (cecolor "bylayer")
    (celtype "bylayer")
    (cmddia 1)
    (startup 1)
    (isavepercent 0)
    (tooltips 0)
    (xrefnotify 2)
    (xloadctl 2)
    (visretain 1)
    (regenmode 1)
    (attmode 1)
    (attreq 1)
    (backgroundplot 0)
    (cmljust 1)
    (demandload 3)
    (draworderctl 3)
    (elevation 0)
    (fielddisplay 1)
    (fieldeval 31)
    (gridmode 0)
    (ucsvp 0)
    (xreftype 1)
    (geomarkervisibility 0)
    (tooltips 1)
    (indexctl 3)
    (expert 5)
    (rollovertips 0)
    (publishcollate 0)
    (ssmautoopen 0)
    (osnapz 1)
    (mirrtext 0)
    (proxygraphics 0)
    (insunitsdefsource 2)
    (insunitsdeftarget 2)
    (maxsort 10000)
    (isavebak 1)
    (isavepercent 1)
    (offsetgaptype 0)
    (savefidelity 0)
    (plinegen 0)
    (plinewid 0)
    (polysides 3)
    (ucsfollow 0)
    (rasterthreshold 100)
    (rasterpercent 90)
    (elevation 0)
    (imageframe 2)
    (geomarkervisibility 0)
    (navvcubedisplay 0)
    (navbardisplay 0)
    (lwdisplay 0)
    (gridmode 0)
    (lwunits 0)
    (orthomode 0)
    (layoutregenctl 0)
    (hpglmode 1)
    (layerdlgmode 0)
  )
)

Returns the sorted list:

Code: [Select]
(
  (ACADLSPASDOC 1)
  (ATTMODE 1)
  (ATTREQ 1)
  (BACKGROUNDPLOT 0)
  (BLIPMODE 0)
  (CECOLOR "bylayer")
  (CELTYPE "bylayer")
  (CMDDIA 1)
  (CMLJUST 1)
  (DEMANDLOAD 3)
  (DRAWORDERCTL 3)
  (ELEVATION 0)
  (ELEVATION 0)
  (EXPERT 5)
  (FIELDDISPLAY 1)
  (FIELDEVAL 31)
  (GEOMARKERVISIBILITY 0)
  (GEOMARKERVISIBILITY 0)
  (GRIDMODE 0)
  (GRIDMODE 0)
  (HPGLMODE 1)
  (IMAGEFRAME 2)
  (INDEXCTL 3)
  (INSUNITSDEFSOURCE 2)
  (INSUNITSDEFTARGET 2)
  (ISAVEBAK 1)
  (ISAVEPERCENT 0)
  (ISAVEPERCENT 1)
  (LAYERDLGMODE 0)
  (LAYOUTREGENCTL 0)
  (LWDISPLAY 0)
  (LWUNITS 0)
  (MAXSORT 10000)
  (MIRRTEXT 0)
  (NAVBARDISPLAY 0)
  (NAVVCUBEDISPLAY 0)
  (OFFSETGAPTYPE 0)
  (ORTHOMODE 0)
  (OSNAPZ 1)
  (PLINEGEN 0)
  (PLINEWID 0)
  (POLYSIDES 3)
  (PROXYGRAPHICS 0)
  (PUBLISHCOLLATE 0)
  (RASTERPERCENT 90)
  (RASTERTHRESHOLD 100)
  (REGENMODE 1)
  (ROLLOVERTIPS 0)
  (SAVEFIDELITY 0)
  (SSMAUTOOPEN 0)
  (STARTUP 1)
  (TOOLTIPS 0)
  (TOOLTIPS 1)
  (UCSFOLLOW 0)
  (UCSVP 0)
  (VISRETAIN 1)
  (XLOADCTL 2)
  (XREFNOTIFY 2)
  (XREFTYPE 1)
)

 :-)

SUPERB, so helpful.... dang.

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: load acaddoc and acad lsp faster?
« Reply #57 on: July 20, 2011, 12:56:17 PM »
Thanks.  Is this proper commenting within the lambda function?

IMO, I rarely use multi-line comments (I think they look ugly), and only really use them when I specifically need to comment something within an expression on the same line, e.g.:

Code: [Select]
(setvar ;| Sets a System Variable |; 'OSMODE 0)
But this is a rare occurrence.

Usually I would opt for single [;] or double semi-colons [;;], and some use triple semi-colons [;;;] for headers.
Of course if you use VLIDE's auto-formatting the comment types have some relevance. The multilines tend to get a space (or more depending on the setting) before it - if it starts on a line of its own. The single semi-colons are usually formatted with one or more spaces after whatever's on the line in front of it, also depending on some settings. The doubles are placed with the same indentation as the code surrounding it, and the tripples are always moved back to the start of the line. So something like this
Code: [Select]
;|My multiline
comment|;
(progn
;;; This comment won't get indented
;; but this one will
(some arb code)     ;With my single comment following
)
Will get formatted thus:
Code: [Select]
  ;|My multiline
comment|;
(progn
;;; This comment won't get indented
  ;; but this one will
  (some arb code) ;With my single comment following
)
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.