TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: viva on May 10, 2007, 02:57:18 AM

Title: memory size in autocad
Post by: viva on May 10, 2007, 02:57:18 AM
hi everybody,
          i am finding problem while georeferencing the images in autocad. the images is in .Tiff format and the size of the image is 850 MB. iam interested to do the georeference through batch mode.but it isnt working.After first image georeferenced, it shows an runtime error " abnormal program termination". This is because of memory problem.
 i am trying to make the memory free,once the first image was over thru lisp.

can anyone give me suggestion to overcome the problem

regards
viva
Title: Re: memory size in autocad
Post by: Adesu on May 10, 2007, 03:19:17 AM
Hi viva,
I'm not really this answerd would help you and true, how about doslib function
look this
Code: [Select]
dos_mem

Returns a list containing information about current available memory. The function returns information about both physical and virtual memory. Use the rtos function to convert the return values to strings.

Syntax
(dos_mem)
Parameters
n/a
 
Returns
A list of numbers describing the current state of memory if successful. The return values are as follows:

Memory Load
 The percent of memory in use (integer).
 
Total Physical
 Total bytes of physical memory.
 
Available Physical
 Available bytes of free physical memory.
 
Total Page File
 Total bytes of the paging file.
 
Available Page File
 Available bytes in the paging file.
 
Total Virtual
 Total user bytes of address space.
 
Available Virtual
 Available, free user bytes of address space.
 


nil on error.

Example
Command: (dos_mem)

(27 5.3633e+008 3.90562e+008 1.30926e+009 1.18208e+009 2.14735e+009 2.06644e+009)




hi everybody,
          i am finding problem while georeferencing the images in autocad. the images is in .Tiff format and the size of the image is 850 MB. iam interested to do the georeference through batch mode.but it isnt working.After first image georeferenced, it shows an runtime error " abnormal program termination". This is because of memory problem.
 i am trying to make the memory free,once the first image was over thru lisp.

can anyone give me suggestion to overcome the problem

regards
viva
Title: Re: memory size in autocad
Post by: viva on May 10, 2007, 04:42:27 AM
while typing the dos_mem command in the command prompt, its showing unknown command, can u tell me the reason

regards
viva
Title: Re: memory size in autocad
Post by: Kerry on May 10, 2007, 04:51:47 AM
Do you have Dos_LIb loaded ?

added:
and the command line command is
(dos_mem)
Title: Re: memory size in autocad
Post by: Adesu on May 10, 2007, 04:56:46 AM
while typing the dos_mem command in the command prompt, its showing unknown command, can u tell me the reason

regards
viva

it's free download,try this
Code: [Select]
Robert McNeel & Associates
3670 Woodland Park Avenue North
Seattle, WA 98103
Phone: (206) 545-7000
FAX: (206) 545-7321
Internet: www.mcneel.com
Support: dale@mcneel.com
Title: Re: memory size in autocad
Post by: viva on May 10, 2007, 06:11:17 AM
thanks for ur kind help. actually dos_mem is used to know the information abut the memory. my requirement is to free the memory. i had searched in doslib i cant able 2 identify. can u suggest me

regards
viva
Title: Re: memory size in autocad
Post by: It's Alive! on May 10, 2007, 07:24:52 AM
You can attempt to free memory, or I should say run the garbage collector by using (gc)
Title: Re: memory size in autocad
Post by: viva on May 10, 2007, 07:40:34 AM
can u explain me some what briefly

regards
viva
Title: Re: memory size in autocad
Post by: It's Alive! on May 10, 2007, 08:47:00 AM
You can find this in your Autolisp Developer's Guide.
 (gc) Forces a garbage collection, which frees up unused memory

Other suggestions would be.. make sure you are using local variables where you can.
Setting global variables to nil immediately when you are done with them and running (gc).
Title: Re: memory size in autocad
Post by: Didge on May 10, 2007, 09:34:30 AM
I guess this isn't the answer you were looking for but I would suggest you try down-sampling the images if at all possible, 850mb is a huge image for any application to handle.

Ironically I've watched 90 minute movie files smaller than that  :-o
Title: Re: memory size in autocad
Post by: scottcd on May 10, 2007, 05:02:42 PM
Have you considered converting them to an ECW file.

Handles large images really well, and still allows georeferencing.

I think the website is www.ermapper.com

Cheers

Scott