Author Topic: Drawing preformance related to drawing limits?  (Read 7610 times)

0 Members and 1 Guest are viewing this topic.

cparnell

  • Guest
Drawing preformance related to drawing limits?
« on: April 07, 2004, 01:14:24 PM »
I found an AutoDesk tip on drawing performance, named "Improving performance when picking objects or regenerating drawing. http://usa.autodesk.com/adsk/servlet/ps/item?siteID=123112&id=2896135&linkID=2475323
It related this problem to drawing outside of the drawing limits. I was curious about seeing if this may help me when my A2K4 is slow while picking objects.
What I tried to do is set my system variable of Limmax to some thing larger than what most of my drawings would need. I opened my acad.lsp file and entered below the rest of my system variables, that work, the following,
(setvar "limmax" "1088',704'"), I then restarted AutoCAD, however when I open existing drawings, hoping that it will update them, they show something like, 1'-5",0'-11". Is not the acad.lsp supposed to over ride the files variable setting? Am I doing something wrong? Does someone have a LISP or routine that will cause all new or existing drawings to update to a predefined limmax variable?

By the way I have a new
Dell
Pentium 4, 2.8 Gig hard drive
128 mg video
1 gig Ram

ACADLSPASDOC is set to 1.
Thanks for any assistance.
Have a good day all.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Drawing preformance related to drawing limits?
« Reply #1 on: April 07, 2004, 03:05:16 PM »
I think carl had the answer for you here

But if your drawing units are in inches you may need to enter '(13056 8448)

Ah, are you having performance problems? :shock:

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.

cparnell

  • Guest
Drawing preformance related to drawing limits?
« Reply #2 on: April 07, 2004, 03:07:44 PM »
Some one on another forum gave me this routine to place in my acad.lsp file and it worked.

(command "limmax" "1088',704'")

Thanks for assistance.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Drawing preformance related to drawing limits?
« Reply #3 on: April 07, 2004, 03:18:21 PM »
Code: [Select]
(setvar "limmax" '(13056 8448) )
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.

ronjonp

  • Needs a day job
  • Posts: 7527
Drawing preformance related to drawing limits?
« Reply #4 on: April 07, 2004, 04:49:01 PM »
Isn't the whole point of setting the limits so that obects are not drawn outside of them. I think LIMMIN is set to 0,0 by default. What if objects are created in negative coordinates? What if LIMMAX varies? Wouldn't this lisp essentially put everything within the limits regardless of their location :?:

Code: [Select]
(defun c:idlim (/ min max)

  (setq min (getvar 'extmin)
max (getvar 'extmax)
  )
  (command ".limits" min max)
  (princ)
)
(c:idlim)


Ron

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Drawing preformance related to drawing limits?
« Reply #5 on: April 07, 2004, 05:06:11 PM »
ronjonp

You can not use min & max as variable names as they are protected symbols.

My line of code is merely expressing the values in inches instead of feet.

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.

ronjonp

  • Needs a day job
  • Posts: 7527
Drawing preformance related to drawing limits?
« Reply #6 on: April 07, 2004, 06:06:30 PM »
EXTMIN:

Quote
Stores the lower-left point of the drawing extents. Expands outward as new objects are drawn; shrinks only withZOOM All or ZOOM Extents. Reported in world coordinates for the current space.


CAB,

Wouldn't this work since the limits would be set according to what was in the drawing?

Thx,

Ron

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Drawing preformance related to drawing limits?
« Reply #7 on: April 07, 2004, 06:33:50 PM »
Well this would work:

Code: [Select]
(defun c:idlim (/ ex_min ex_max)
  ;Make 2D point from 3D point
  (defun 3dP->2dP (3dpt)(list (car 3dpt) (cadr 3dpt)))
  (setq ex_min (3dP->2dP(getvar 'extmin))
          ex_max (3dP->2dP(getvar 'extmax))
  )
  (command ".limits" ex_min ex_max)
  (princ)
)
(c:idlim)


But if the user wanted to set min at 0,0 and there was no entity there it could shrink or expand the limits.
And I think the person was wanting to set max at a predetermined value
not determined by objects.
Your code will do what you wanted, not necessarily what he/she wanted.

You can not use the works min and max as variable names. That is the same as
trying to use defun as a variable name.

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.

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Drawing preformance related to drawing limits?
« Reply #8 on: April 07, 2004, 11:13:41 PM »
cparnell, in order for the code placed in acad.lsp to work for every drawing, you must set the variable acadlspasdoc to 1
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

hudster

  • Gator
  • Posts: 2848
Drawing preformance related to drawing limits?
« Reply #9 on: April 08, 2004, 03:53:15 AM »
Anyone know the limits for metric?

This imperial stuff baffles me!! :shock:
Revit BDS 2017, 2016, 2015, 2014, AutoCAD 2017, 2016, Navisworks 2017, 2016, BIM360 Glue

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Drawing preformance related to drawing limits?
« Reply #10 on: April 08, 2004, 08:19:24 AM »
The limits are whatever you set them to. If you want to know the limits in a specific drawing (or a template for that matter) simply type LIMMIN and LIMMAX at the command line
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

cparnell

  • Guest
Drawing preformance related to drawing limits?
« Reply #11 on: April 09, 2004, 09:49:22 AM »
CAB:

THANKS for your input and time.

Is it true that (c:idlim) at the end of your routine causes the routine to run each time a drawing is opened?

When I opened a drawing, I got this in the AutoCAD Text Window:

Reset Model space limits:
Specify lower left corner or [ON/OFF] <-11'-4",-22'-0">:
Specify upper right corner <45'-4",22'-0">:

but when I typed in idlim I get:

Command: idlim
.limits
Reset Model space limits:
Specify lower left corner or [ON/OFF] <0'-0",0'-0">:
Specify upper right corner <56'-8",44'-0">:

Should there be a difference?

daron

  • Guest
Drawing preformance related to drawing limits?
« Reply #12 on: April 09, 2004, 11:53:20 AM »
I moved this topic because it has nothing to do with showing your stuff, but more of asking for help.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Drawing preformance related to drawing limits?
« Reply #13 on: April 09, 2004, 12:07:27 PM »
Quote from: cparnell
Is it true that (c:idlim) at the end of your routine causes the routine to run each time a drawing is opened?

YES
Quote
When I opened a drawing, I got this in the AutoCAD Text Window:

Reset Model space limits:
Specify lower left corner or [ON/OFF] <-11'-4",-22'-0">:
Specify upper right corner <45'-4",22'-0">:

but when I typed in idlim I get:

Command: idlim
.limits
Reset Model space limits:
Specify lower left corner or [ON/OFF] <0'-0",0'-0">:
Specify upper right corner <56'-8",44'-0">:

Should there be a difference?


Not what i would expect.
Did you modify the drawing in any way?
If you close & reopen the drawing do you get the same results?

On another note, May need to modify the code for the case when a tab is active.

Code: [Select]
(defun c:idlim (/ ex_min ex_max)
  ;Make 2D point from 3D point
  (defun 3dP->2dP (3dpt)(list (car 3dpt) (cadr 3dpt)))
  (setvar "tilemode" 1) ; force Model space
  (setq   ex_min (3dP->2dP(getvar 'extmin))
          ex_max (3dP->2dP(getvar 'extmax))
  )
  (command ".limits" ex_min ex_max)
  (princ)
)
(c:idlim)
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.

cparnell

  • Guest
Drawing preformance related to drawing limits?
« Reply #14 on: April 09, 2004, 12:32:12 PM »
CAB:

I just added
-11'-4" + 45'-4"
&
-22'-0" + 22'-0"
and they totaled

56'-8" & 44'-0" which equals the following Text Window info:

Command: idlim
.limits
Reset Model space limits:
Specify lower left corner or [ON/OFF] <0'-0",0'-0">:
Specify upper right corner <56'-8",44'-0">:

So it works, thanks. Hopefully it will solve my slow object selection problems.

ronjonp

  • Needs a day job
  • Posts: 7527
Drawing preformance related to drawing limits?
« Reply #15 on: April 09, 2004, 03:40:24 PM »
Another thing that you can do to speed up selection is set your object sort method to object selection.

(setvar 'sortents 1)

Ron :D

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

cparnell

  • Guest
Drawing preformance related to drawing limits?
« Reply #16 on: April 12, 2004, 07:42:25 AM »
ronjonp:

I will try this setting and see how it affects my drawings. Thanks!
I am aware that check boxes are located in the Options dialog box under the User Preferences tab, Objects Sorting Methods section, and have read help file for sortents, however I still don't understand exactly what or how this affects drawings.