PDA

View Full Version : Script Failure



BIGMIKE09281946
26th Apr 2009, 05:34 pm
I Am Trying To Get This Script To Work And Have Almost Lost All My Hair In The Process. Please Help Me. I Have E Spent Too Much Time On It Already. Its Sunday And I Got Other Fires In The Oven.

BIGAL
27th Apr 2009, 12:19 am
limits needs two points

dont have brackets around your pts

thats all folks will not work also, script will detect spaces as commands do text as
(setq ans "thats all folks")
text 1,1 5 ans

as script is short paste in view saves having to download

why delay ?

BIGMIKE09281946
28th Apr 2009, 12:49 am
THIS IS AN ASSIGNMENT IN THE AUTOCAD COURSE GIVEN TO ME BY PENN FOSTER. AND LIKE ANY GOOD SOLDIER I DOS LIKE THAY SAYS.

THERE ARE TWO SPACES IN THE LIMITS LINE AND MY PC SEEMS TO THING OF THEM AS O,O AND 24,24!o:)

CarlB
28th Apr 2009, 07:49 am
Can't you see what AutoCAD reports on the command line to see where the script "fails"?

I agree no parentheses around coordinates. And the "copy" "l" line needs an extra enter (space) to complete the selection. Some lines have a few spaces after them, not sure if that is intended.

BIGMIKE09281946
4th May 2009, 01:52 am
I Am Still Working On This Thing. How Can I End A Multiple Command In My Script?

CarlB
4th May 2009, 02:13 am
Simulate an 'escape", with


(command)

BIGMIKE09281946
4th May 2009, 04:30 pm
I don't understand! (command)

BIGMIKE09281946
4th May 2009, 09:01 pm
GRID ON
LIMITS 0,0 36,36
ZOOM A
;the following three lines are for locating purposes only, and I have
;to find a way to end the multiple command
;PDMODE 3
;MULTIPLE
;POINT 12,12 18,12 12,18 6,12 12,6
CIRCLE 12,12 4
DELAY 5000
COPY L
M 6,12 18,12

;the following line does not work it is just there so that the circles
;can be seen before they are erased
DELAY 5000

ERASE W 0,0 36,36

;the following is what i get in the command text window. what's up
;with the DELAY repeating?
;Command: DELAY Enter delay time (in milliseconds): 5000
;
;Command:
;DELAY Enter delay time (in milliseconds): ERASE
;Requires an integer between 0 and 32767.

CarlB
4th May 2009, 10:20 pm
I'm guessing the "delay" command repeated because you had a space at the end or a blank line after?

And here's how to use my 'escape' suggestion:



MULTIPLE
POINT 12,12 18,12 12,18 6,12 12,6
(command)
CIRCLE 12,12 4
DELAY 5000
COPY L

BIGAL
5th May 2009, 03:22 am
If you use word you can turn on the spaces and end of line character to display this will show extra spaces etc click the PI symbol to turn on if not sure use the word help display mode?

An extra space is like you press enter the same can be done with a blank line a lot of autocad commnads need that last enter to exit the current command in lisp it would be "".

BIGMIKE09281946
5th May 2009, 06:57 pm
HERE IS THE FINISHED PRODUCT. AND, INTERESTINGLY THE TEXT "THATS ALL FOLKS!" DOES NOT APPEAR UNTIL ACAD LOSES FOCUS?;

GRID ON
LIMITS 0,0 36,36
ZOOM A
;the following three lines are for locating purposes only, and I have

;to find a way to end the multiple command
PDMODE 3
;MULTIPLE
POINT 12,12 POINT 18,12 POINT 12,18 POINT 6,12 POINT 12,6

DELAY 1500
CIRCLE 12,12 4
DELAY 1500
COPY L
M 6,12 18,12


DELAY 1500
;GRID OFF
ERASE W 0,0 36,36
DELAY 1500
LIMITS 0,0 12,9
ZOOM A
;GRID OFF
TEXT 1,1 .5 0 THATS ALL FOLKS!
DELAY 1500
ERASE L
DELAY 1500
RSCRIPT