Author Topic: CDG Purge 3.0 in a script question using AutoCAD 2005  (Read 4221 times)

0 Members and 1 Guest are viewing this topic.

Andrew H

  • Guest
CDG Purge 3.0 in a script question using AutoCAD 2005
« on: July 08, 2004, 12:52:02 PM »
I am running CDG Purge 3.0 and have a question about running the program in a script file.

In the script I have the following:
Code: [Select]

audit
y
-purge
a

n
audit
y
-purge
a

n
zoom
e
-cdgpurge
a

But when I run this script it hangs and just keeps entering a blank command promt. And I can change the order of the commands in the script file and still the same result.
(i.e.
command:
command:
command:
command:
command:
command:
command:
etc.)

Does anyone know what's going on?

hendie

  • Guest
CDG Purge 3.0 in a script question using AutoCAD 2005
« Reply #1 on: July 08, 2004, 01:03:01 PM »
in the script file you need an extra carriage return after the last entry so Acad can read the file properly ~ it doesn't look like you've got that in te code fragment you posted... but that may just be a cut and paste thing.

other than that, I'm not sure but it may not be possible to run external programmes from within Script Pro. You can run custom lisps inside script pro but I don't know about external apps ~ but if it's all command line driven, you should be able to.

Andrew H

  • Guest
CDG Purge 3.0 in a script question using AutoCAD 2005
« Reply #2 on: July 08, 2004, 01:10:31 PM »
CDG Purge has added the "-cdgpurge" option specifically to run the program in script.

CDG Purge is a third party ACAD Plug in which runs from ACAD's command prompt.

I have an e-mail sent to the makers for CDG Purge asking the same question I posted here, but haven't received a responce yet. (I will post the results of the reply when I have a chance)

hendie

  • Guest
CDG Purge 3.0 in a script question using AutoCAD 2005
« Reply #3 on: July 08, 2004, 02:10:27 PM »
since there's a command line version, it should simply be a case of entering the command and the responses it expects to recieve in your script file.
did you check you had te extra <enter> at the end of the script ?

ImaJayhawk

  • Guest
CDG Purge 3.0 in a script question using AutoCAD 2005
« Reply #4 on: July 08, 2004, 02:55:21 PM »
Looks like the last carriage return is the culprit.  If you enter the return manually it works fine.  Otherwise after it runs through -cdgpurge it gets stuck in a continuous loop.


--ImaJayhawk

Andrew H

  • Guest
CDG Purge 3.0 in a script question using AutoCAD 2005
« Reply #5 on: July 08, 2004, 02:58:57 PM »
Yes the extra <enter> is at the bottom of the file.

When running the script version of the command at the command prompt (but not in a script) it has a blank command entry after the option is complete.

example:

Command: -cdgpurge
[LAyer filters/layer STates/LMan layer states/Registered applications/Page
setups/empty Groups/All]:a
Command: <--- this one is part of the cdgpurge command.
Command: <--- this one is waiting for the user's next command.

Is there anyway through script, to tell ACAD to ignore the "Command" after the cdg purge runs?

hendie

  • Guest
CDG Purge 3.0 in a script question using AutoCAD 2005
« Reply #6 on: July 08, 2004, 03:04:40 PM »
you could try leaving out the extra <enter> or try ^C^C to see if that works

Andrew H

  • Guest
CDG Purge 3.0 in a script question using AutoCAD 2005
« Reply #7 on: July 08, 2004, 03:09:43 PM »
I'll try those and post the results.

Andrew H

  • Guest
CDG Purge 3.0 in a script question using AutoCAD 2005
« Reply #8 on: July 08, 2004, 05:18:58 PM »
No matter what I do (delete the <enter> at the end of the script file or add ^C^C) the CDG Purge hangs up.[/img]

hendie

  • Guest
CDG Purge 3.0 in a script question using AutoCAD 2005
« Reply #9 on: July 09, 2004, 03:53:35 AM »
so what is it exactly that this cdpurge does that you can't do from Acad without using lisp etc ?

Andrew H

  • Guest
CDG Purge 3.0 in a script question using AutoCAD 2005
« Reply #10 on: July 09, 2004, 01:36:22 PM »
It allows the user to purge unused named layer filters, Layer States, Registered Applications, Pages Setups, LMAN Layer States, and Empty Groups.

Very nice features especially since Autodesk has changed the Named Layer Filters interface in 2005 which means my lisp didn't work any more.

Best of all it's FREE.