Author Topic: Zoom state related error with AutoLisp Script  (Read 2114 times)

0 Members and 1 Guest are viewing this topic.

septicad

  • Guest
Zoom state related error with AutoLisp Script
« on: November 14, 2014, 10:16:16 AM »
I've made the switch to AutoCAD 2015 vanilla (i run C3D as vanilla), and i tweaked my template file a bit to change default CTBs, some minor formatting the PS layout, in the process i apparently ichanged the zoom level in model space when the template is opened.

The script i have generates a drawing in model space.  But now, I'm struggling to figure out why my AutoLISP script has this funky bug that is dependent on the zoom level. 

OSNAP and ORTHO are toggle off for the entire script and then reset to what they were at the end.   The "WHEN-ZOOMED-OUT.PNG" output is generated when i'm zoomed out... but if i just delete everything, zoom in two or three times (with the mouse roller) and an rerun the script, i get the right output "WHEN ZOOMED IN.PNG".

The simple fix is to just zoom way in and resave the template, but i'm at a loss as to why this issue should be happening at all. 

Note that all of the entities are drawn using command line calls, not VLISP.

Thoughts?
Steve

ChrisCarlson

  • Guest
Re: Zoom state related error with AutoLisp Script
« Reply #1 on: November 14, 2014, 11:01:07 AM »
Don't think its related to your script or routine at all. I have the issue where circles (depending on the zoom state) appear to be pentagons or circles. What happens when you "rea" the drawing while it looks all jaggedy?

septicad

  • Guest
Re: Zoom state related error with AutoLisp Script
« Reply #2 on: November 14, 2014, 11:48:44 AM »
good idea... but regen or regen all does not help.  if i zoom waaaaaaay in or to what would be the extents of the script output then it works.

if i zoom out to like twice the extents of what the script output would be, the problem begins to occur.  as i continue to zoom out and run script at various zoom levels until the the output is essentially a point on the screen,  the output changes at different zoom levels - this is why i feel like it related to osnap or cursor related somehow?... but how is still troubling me. 

Steve

roy_043

  • Water Moccasin
  • Posts: 1895
  • BricsCAD 18
Re: Zoom state related error with AutoLisp Script
« Reply #3 on: November 16, 2014, 05:36:44 AM »
@ SeptiCAD:
I think your initial analysis is correct. But without any code a definite conclusion is not possible.

danallen

  • Guest
Re: Zoom state related error with AutoLisp Script
« Reply #4 on: November 16, 2014, 09:33:01 AM »
...- this is why i feel like it related to osnap or cursor related somehow?...

check your OSNAPCOORD variable?

septicad

  • Guest
Re: Zoom state related error with AutoLisp Script
« Reply #5 on: November 17, 2014, 07:46:29 AM »
setting OSNAPCOORD to 1 fixed the problem..  didn't even know that sysvar existed.
THANK YOU! danallen
Steve