I saw this post late.. I have a batch file which generates barcodes. It run for me well. Some adjustment is required in file path. Following files needed , barcode.lsp mfind.lap (to be saved in ACAD folder) IDAutomationHC39M.ttf
The barcode is written in Isometric through Autocad scripting method.
1. Create own Iso create form.. You need to stop Iso repeating numbers like 001, 002 003 etc, It should always generate 001. Otherwise it is difficult to locate file through PDMS batch. FILE DXF /Z:\CAD\PDMS\Project\bdo\pdms_dbs\BDOinfo\DXF/$!filename- SINGLE DETAIL /$!filename
Exit
syscom |copy "Z:\CAD\PDMS\Project_Files\Barcode\BDO_BarCodepdms.bat" "c:\temp\script\$!filename-.bat" /y|
syscom |"c:\temp\script\$!filename-.bat"|
2. create a DOS batch file BDO_BarCodepdms.bat at above mentioned folder. This will be master batch for each iso. add following code
@echo off
set fpath=Z:\CAD\PDMS\Project\bdo\pdms_dbs\BDOinfo\DXF
set acadpath="C:\Program Files\Autodesk\AutoCAD 2011\acad.exe"
ECHO ------------------------------
set fname=%~n0%~x0
set fname=%fname:~0,-5%
set fname=%fname%
echo.%fname%
if not exist %temp%\script md %temp%\script
set scrpath=%temp%\script
if exist %fpath%\%fname%-001.dwg del %fpath%\%fname%-001.dwg
if exist %scrpath%\%fname%.scr del %scrpath%\%fname%.scr
set STRING1=(Load "barcode.lsp")
set STRING2=(Load "mfind.lsp")
set scrfile=%scrpath%\%fname%.scr
echo Generating and Adding Barcode in drawing..... Please Wait......
echo _.Open "%fpath%\%fname%-001.dxf">>%scrfile%
echo _.Zoom _E>>%scrfile%
echo %string2%>>%scrfile%
echo (CommandMFind "ISOID:" " " T T T T T nil nil)>>%scrfile%
echo (CommandMFind "%line%" "" T T T T T nil nil)>>%scrfile%
echo %string1%>>%scrfile%
echo style IDAutomationHC39M 4 1 >>%scrfile%
echo text 352.7,6.5,0 0 %codename%>>%scrfile%
echo _.Quit >>%scrfile%
echo _.Quit>>%scrfile%
3. in Isopreviewstdinch.txt file add a code for barcode.. wahtever you wantedas barcode
TextPosition |ISOID: $!ctrnum-$!C-$!D-$!E-$!F-$!G-$!revn| X 1'2in Y 0.1/4in CharHeight 0.1/16in
4. ISOID: (and one space) needed for acad script to find replace text. This is required to omit barcode text in dxf file and replace the same with barcode font.
I saw this post late.. I have a batch file which generates barcodes. It run for me well. Some adjustment is required in file path. Following files needed , barcode.lsp mfind.lap (to be saved in ACAD folder) IDAutomationHC39M.ttf
The barcode is written in Isometric through Autocad scripting method.
1. Create own Iso create form.. You need to stop Iso repeating numbers like 001, 002 003 etc, It should always generate 001. Otherwise it is difficult to locate file through PDMS batch. FILE DXF /Z:\CAD\PDMS\Project\bdo\pdms_dbs\BDOinfo\DXF/$!filename- SINGLE DETAIL /$!filename
Exit
syscom |copy "Z:\CAD\PDMS\Project_Files\Barcode\BDO_BarCodepdms.bat" "c:\temp\script\$!filename-.bat" /y|
syscom |"c:\temp\script\$!filename-.bat"|
2. create a DOS batch file BDO_BarCodepdms.bat at above mentioned folder. This will be master batch for each iso. add following code
@echo off
set fpath=Z:\CAD\PDMS\Project\bdo\pdms_dbs\BDOinfo\DXF
set acadpath="C:\Program Files\Autodesk\AutoCAD 2011\acad.exe"
ECHO ------------------------------
set fname=%~n0%~x0
set fname=%fname:~0,-5%
set fname=%fname%
echo.%fname%
if not exist %temp%\script md %temp%\script
set scrpath=%temp%\script
if exist %fpath%\%fname%-001.dwg del %fpath%\%fname%-001.dwg
if exist %scrpath%\%fname%.scr del %scrpath%\%fname%.scr
set STRING1=(Load "barcode.lsp")
set STRING2=(Load "mfind.lsp")
set scrfile=%scrpath%\%fname%.scr
echo Generating and Adding Barcode in drawing..... Please Wait......
echo _.Open "%fpath%\%fname%-001.dxf">>%scrfile%
echo _.Zoom _E>>%scrfile%
echo %string2%>>%scrfile%
echo (CommandMFind "ISOID:" " " T T T T T nil nil)>>%scrfile%
echo (CommandMFind "%line%" "" T T T T T nil nil)>>%scrfile%
echo %string1%>>%scrfile%
echo style IDAutomationHC39M 4 1 >>%scrfile%
echo text 352.7,6.5,0 0 %codename%>>%scrfile%
echo _.Quit >>%scrfile%
echo _.Quit>>%scrfile%
3. in Isopreviewstdinch.txt file add a code for barcode.. wahtever you wantedas barcode
TextPosition |ISOID: $!ctrnum-$!C-$!D-$!E-$!F-$!G-$!revn| X 1'2in Y 0.1/4in CharHeight 0.1/16in
4. ISOID: (and one space) needed for acad script to find replace text. This is required to omit barcode text in dxf file and replace the same with barcode font.