Author Topic: Problem with (princ) function  (Read 1329 times)

0 Members and 1 Guest are viewing this topic.

Lupo76

  • Bull Frog
  • Posts: 343
Problem with (princ) function
« on: June 30, 2016, 12:08:05 PM »
I made a file that takes a long time to process.
So I decided to insert the following line of code:

(princ (strcat "\nObject " N " of "  TOT "."))

It works, but I do not see the text lines during the (while)process, but only at the end.
I feel that this happens because AutoCAD is too busy and therefore does not update the command bar.
Do you have any advice?

ChrisCarlson

  • Guest
Re: Problem with (princ) function
« Reply #1 on: June 30, 2016, 12:49:01 PM »
Can you post your section of routine?

If the princ is outside of the while loop, it will only display once the loop is exited.

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: Problem with (princ) function
« Reply #2 on: June 30, 2016, 02:05:03 PM »
If AutoCAD is rendered unresponsive by the OS as a result of the AutoLISP program/expression taking more than 5 seconds to evaluate, no output will be printed to the command-line until the program has completed evaluation. However, there are 'tricks' that one can use to ensure that AutoCAD is not marked as non-responsive by the OS, such as interspersing calls to the DELAY command or GRREAD function within the processing loop.

See this thread for more.

rkmcswain

  • Swamp Rat
  • Posts: 978
Re: Problem with (princ) function
« Reply #3 on: June 30, 2016, 02:53:59 PM »
Quote from: Lee Mac
However, there are 'tricks' that one can use to ensure that AutoCAD is not marked as non-responsive by the OS....

Good stuff Lee Mac !

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: Problem with (princ) function
« Reply #4 on: June 30, 2016, 07:08:31 PM »
Quote from: Lee Mac
However, there are 'tricks' that one can use to ensure that AutoCAD is not marked as non-responsive by the OS....

Good stuff Lee Mac !

Cheers RK  :-)