Script Pro 2.0

Script Pro 2.0

sssf_23
Enthusiast Enthusiast
2,231 Views
12 Replies
Message 1 of 13

Script Pro 2.0

sssf_23
Enthusiast
Enthusiast

I am currently using Script 2.0 to batch a delete stamp script. I am not very familiar with this program. When I run my batch everything seems fine & the status is "Done" but when I open the original drawing my stamps are still there. Not sure, but I think it is not saving properly. I have qsave at the end of my script. When I run using the wizard button. I can see that the stamps are coming off but they are not saving. I also am using Auto CAD 2020. Can someone please assist. Thanks

0 Likes
Accepted solutions (1)
2,232 Views
12 Replies
Replies (12)
Message 2 of 13

cadffm
Consultant
Consultant

Hi,

 

is your script working in a single file without scriptpro incl. Qsave?

Share your Script.

 

Screenshot of scriptpro window

and Scriptpro settings?

Where is the report from Scriptpro?

 

 

We need more informations to help you.

 

Sebastian

Message 3 of 13

pendean
Community Legend
Community Legend
Test your script file in that DWG file (without the add-on) to see if it even works first using SCRIPT command: let us know.
Message 4 of 13

sssf_23
Enthusiast
Enthusiast

Ok, so yesterday everything appeared to be working properly but today is different. I did as you suggested & tested the script on a single file. When I drag & drop the script into the drawing a message comes up: 3 of the monitored system variables have changed from the preferred value. Use SYSVARMONITOR command to view changes. When I copy & paste "SYSVARMONITOR" this is what I receive:

sssf_23_0-1661345904694.png

I have unchecked Notify when these system variables change, reset all & ok. It's not reading the script at all on drag & drop. If I copy & paste to the command line, the command processes but I receive: 1 of the monitored system variables have changed from the preferred value. Use SYSVARMONITOR command to view changes.

sssf_23_1-1661346497414.png

I'm not even sure at this point if it is saving & reading the script all the way through & I'm assuming it is not.

 

My script is:

FILEDIA 0
CMDDIA 0
-laydel
n
stamp

 

y
z e
-purge
a
*
n
-purge
a
*
n
FILEDIA 1
CMDDIA 1
qsave 

 

I'm bascially just trying to delete a stamp(s) on a stamp layer, purge it, zoom extents, then save.

 

Script Pro Window:

sssf_23_2-1661346960584.pngsssf_23_3-1661347052539.pngsssf_23_4-1661347233360.pngsssf_23_5-1661347311294.png

 

Report on one drawing as follows:

Project file:
Drawing file: C:\Users\ericka.breaux\Desktop\Test\G3204A01.DWG

Processed by Computer: QL-PF20JH1X

User name : Ericka.Breaux

[ Status summary ]
Done


R e d i r e c t s t d o u t ( f i l e : C : \ U s e r s \ E R I C K A ~ 1 . B R E \ A p p D a t a \ L o c a l \ T e m p \ a c c c 1 2 1 1 6 2 ) .
A c C o r e C o n s o l e : S t d O u t C o n s o l e M o d e : p r o c e s s e d - o u t p u t : d i s a b l e d , a u t o
A u t o C A D C o r e E n g i n e C o n s o l e - C o p y r i g h t 2 0 1 9 A u t o d e s k , I n c . A l l r i g h t s r e s e r v e d . ( Q . 4 7 . 0 . 0 )

E x e c u t i o n P a t h :
C : \ P r o g r a m F i l e s \ A u t o d e s k \ A u t o C A D 2 0 2 0 \ a c c o r e c o n s o l e . e x e

V e r s i o n N u m b e r : Q . 4 7 . 0 . 0 ( U N I C O D E )
C o r e H e a r t B e a t
R e g e n e r a t i n g m o d e l .
P r e s s E N T E R t o c o n t i n u e :
* * * * S y s t e m V a r i a b l e C h a n g e d * * * *
3 o f t h e m o n i t o r e d s y s t e m v a r i a b l e s h a v e c h a n g e d f r o m t h e p r e f e r r e d v a l u e . U s e S Y S V A R M O N I T O R c o m m a n d t o v i e w c h a n g e s .


C o m m a n d :
C o m m a n d :

C o m m a n d :
C o m m a n d : F I L E D I A
E n t e r n e w v a l u e f o r F I L E D I A < 0 > : 0

C o m m a n d : C M D D I A
E n t e r n e w v a l u e f o r C M D D I A < 0 > : 0

C o m m a n d : - l a y d e l

S e l e c t o b j e c t o n l a y e r t o d e l e t e o r [ N a m e ] : n

E n t e r l a y e r n a m e o r [ ? ] : s t a m p

S e l e c t e d l a y e r s : S T A M P .
S e l e c t o b j e c t o n l a y e r t o d e l e t e o r [ N a m e / U n d o ] :

* * * * * * * * W A R N I N G * * * * * * * *

T h e r e a r e 1 b l o c k d e f i n i t i o n ( s ) w h i c h r e f e r e n c e t h e l a y e r ( s ) y o u a r e d e l e t i n g .
T h e b l o c k ( s ) w i l l b e r e d e f i n e d a n d t h e e n t i t i e s r e f e r e n c i n g t h e l a y e r ( s )
w i l l b e r e m o v e d f r o m t h e b l o c k d e f i n i t i o n ( s ) .

Y o u a r e a b o u t t o d e l e t e l a y e r " S T A M P " f r o m t h i s d r a w i n g .

D o y o u w i s h t o c o n t i n u e ? [ Y e s / N o ] < N o > : y

R e d e f i n i n g b l o c k " S T A M P " .

D e l e t i n g l a y e r " S T A M P " .
1 l a y e r d e l e t e d .
C o m m a n d : z U n k n o w n c o m m a n d " Z " . P r e s s F 1 f o r h e l p .

C o m m a n d : _ . q u i t

C o m m a n d :
* * * * S y s t e m V a r i a b l e C h a n g e d * * * *
2 o f t h e m o n i t o r e d s y s t e m v a r i a b l e s h a v e c h a n g e d f r o m t h e p r e f e r r e d v a l u e . U s e S Y S V A R M O N I T O R c o m m a n d t o v i e w c h a n g e s .

------------------------------------------------------------------------------
------------------------------------------------------------------------------

Hope this is enough information to find a solution. I really appreciate you responding & taken the time to assist.

0 Likes
Message 5 of 13

sssf_23
Enthusiast
Enthusiast

According to the report it looks like it is stopping at the zoom command. I think it has something to do with the spacing or how the script is written. I have tried so many combinations but I can not get it to work.

0 Likes
Message 6 of 13

pendean
Community Legend
Community Legend

@sssf_23 wrote:

According to the report it looks like it is stopping at the zoom command. I think it has something to do with the spacing or how the script is written. I have tried so many combinations but I can not get it to work.


One thing you can always avoid when coding script files is the abrupt change in style (most of your script is one spelled-out commandname per line, then somewhere along the way you opted for abbreviations and multiple commands on a single line).

 

And are you positive 100% that after that Y and before "Z E" there does not need to be another space?

 

Try again. Keep testing. 

0 Likes
Message 7 of 13

cadffm
Consultant
Consultant

I deleted my Post (you posted Script came up wrong in the browser, so my answer didn't fit your situation)

 

 

 

You are using an ALIAS instead of the command name!

 

Zher is no command "Z", but "ZOOM"

try it with ZOOM instead of a simple Z

 

ZOOM e

 

Sebastian

0 Likes
Message 8 of 13

sssf_23
Enthusiast
Enthusiast

Thanks

0 Likes
Message 9 of 13

cadffm
Consultant
Consultant
Accepted solution

Was it the problem (zoom vs z) ?

Sebastian

0 Likes
Message 10 of 13

sssf_23
Enthusiast
Enthusiast

Actually yes. I changed it to zoom. When I drag & drop now it works but when I use script pro it says "Error while reading log file C:\... where ever the file is located. & it fails. Still working on it. I did change my script a bit.

0 Likes
Message 11 of 13

cadffm
Consultant
Consultant

Start a reboot and take a coffee, try it again.

I am off of ideas for this issue.

Sebastian

0 Likes
Message 12 of 13

sssf_23
Enthusiast
Enthusiast

Lol, ikr.. it's stressing me out. I do need a break. I'll take one & try again tomorrow to troubleshoot. I'm gonna figure it out though cause it bothers me. Thanks for your help though

0 Likes
Message 13 of 13

sssf_23
Enthusiast
Enthusiast

Hey got it to work. Just wanted to let you know

0 Likes