PDA

View Full Version : a2cbatch.ini vs cmd line


Kyudos
29-07-2009, 02:18 PM
I'm probably missing something somewhere along the line but, I'm accessing the a2c32.dll from my application. If I use the following code (wrapped for clarity):

sCmdLine.Format("/C0=40 /L=\"SHP\" /SV=14 /SD=6 /SP=2 /SPU=1
/SPZ=-1 /T=-1 /TS=ARIAL_TT /TF=\"ARIAL.TTF\" /TO=1 /TOF=1.0000 /TL=1
/TLL=\"SHPTEXT\" /TPAF=2 %s%s%s Test.dxf", "\"", fullName, "\"");
char exec_param[1024] = "";
strcpy(exec_param, sCmdLine);
iret = exec_arcv2cad(exec_param, 0);

I get the output I desire.

However, if I try to set up a2cbatch.ini to produce the same output:


; Hide batch mode dialog
/H
; Logging (0 = no log file, 1 = stop on errors, 2 = ?, 3 = skip errors, 4 = ?)
/LOG=1
; Popup warnings (0 = hide, 1 = show)
/W1

/C0=40
/L="SHP"
/SV=14
/SD=6
/SP=2
/SPU=1
/SPZ=-1
/T=-1
/TS=ARIAL_TT
/TF="ARIAL.TTF"
/TO=1
/TOF=1.0000
/TL=1
/TLL="SHPTEXT"
/TPAF=2

[Arcv2CAD]
Viewer=x


I don't get the same results.

So what (if anything) am I doing wrong?
What is the relationship between a2cbatch.ini, a2cdll.ini and command line switches? And which over-rides which?

Thanks,

Dan

GuthCAD Software Support
30-07-2009, 01:10 PM
Hi,

re.
What is the relationship between a2cbatch.ini, a2cdll.ini and command line switches? And which over-rides which? a2cbatch.ini overrides a2cdll.ini
And command line parameters override both.

I have done a test here just with the color switch (/C0) to confirm the above, but not with the complete set of switches in your example.

regards,
Software Support

Kyudos
30-07-2009, 01:14 PM
Thanks for the reply.

Since I still can't seem to get a2cbatch.ini to work fully, I tried loading my command line options from a file thus:

/C0=5 /LFN="Layer" /LC=2 /SV=14 /SD=6 /SP=2 /SPU=1 /SPZ=-1 /T=-1 /TS=ARIAL_TT /TF="ARIAL.TTF" /TC=5 /TO=1 /TOF=1.0000 /TL=2 /TPAF=2 /SM=1

This works better than the batch file approach (I get the text labels), but I now have another problem. It gives me the log output:

Warning
Switch '/LF=0' index was out of range.
Turning off Layers derived from features.

Translate C:\Program Files\Arcv2CAD5\dairyfertdemo.shp --> D:\Temp\~Des~Int.dxf
Processing Shapes...(Click right mouse button to stop)
126 records processed.
Save as ( AutoCAD Rel 14 ) format file.
Writing output file D:\Temp\~Des~Int.dxf OK
Points Processed = 2136
Points eliminated through merging = 0
Eliminated 0 overlapping labels
Global Scaling / Projection applied to this translation: None
End Conversion (time = 0 seconds)

As you can see it seems to have ignored my projection settings.

Is this a related problem?

GuthCAD Software Support
31-07-2009, 03:33 PM
Hi,

We have confirmed that the /SPZ=-1 setting is being ignored. A software update will be posted later today to fix that.

The "Switch '/LF=0' index was out of range" message will occur if there is no accompanying .DBF file. Can you check that?

best regards,
Software Support

GuthCAD Software Support
01-08-2009, 03:10 AM
A software update to fix the ignoring of the projection switch /SPZ=-1 is now at our download page.

Arcv2CAD 5.0 A.63 (http://www.guthcad.com/download.htm)

Software Support

Kyudos
03-08-2009, 11:01 AM
The patch appears to fix the problems I was having with both the batch file and command-line-from-file approach.

However, the batch file approach still seems to ignore the /E, /EN and /ES switches, although they seem to work in the command line.