Isodraw 7.1 Macro query
Hi all,
I am new to this so please be patient.
Below is a macro I created. I have added statements to explain what is happening throughout and It works fine if I load a CGM into isodraw and then run the macro.
The problem comes when I call the macro from the batch process tool. That's where it crashes and burns. I have also tried running this from the command line but the same thing happens.
It is pretty clear to me that closing the document is causing the batch tool to go down. So if anyone knows some extra code I could use to just loop within my macro the number of times, equivalent to the number of CGM in my source directory I think it would do the trick.
Any ideas would be appreciated.
One other question: is there a line of code I can use to lock and unlock certain layers?
Cheers
Macro test
#Save original document number as string.
DEFINE doc AS string
doc = 'ICN-' + activeDoc.name
#SELECT THE WHOLE DRAWING
select all
MESSAGE "the file's full name is: " + doc
Group Selection
COPY
##########works up until here using batch programme###################
#Closes source document
CLOSE CONFIRM_NO
#hard coded to open official Project Pageframe
Open "C:\Batchin\951pageframe.iso"
activeDoc.name = doc
ACTIVATE LAYER "Standard layer"
#Delete existing blank ERM and ICN numbers
Select if Text contains 'ERM'
Delete selection
Select if Text contains 'AAAAAA'
Delete selection
PASTE Selection SAME_POSITION
Ungroup Selection
DEFINE path AS string
path = 'C:\Batchout\'
#MESSAGE "File will be saved as: " path + name + extension
Save path + doc
#CLOSE CONFIRM_NO
End Macro
#Format for running from command line and saving as base iso format
#IsoDraw71.exe -batch -s"C:\Batchin" -d"C:\Batchout" -f0 -m"test"

