Author |
Topic |
|
n/a
deleted
12 Posts |
Posted - December 05 2012 : 8:48:10 PM
|
I need to compile title block attributes from multiple drawings using ATTEXT in Hurricane. This works fine, except that I am forced to specify the txt filename. What I need is to automatically create the txt files as per each DWG name.
Any ideas on how this may be done please?
|
|
Admin
Administrator
652 Posts |
Posted - December 05 2012 : 9:51:01 PM
|
Just use Hurricane TAGS.
I think the one you need to insert into your script is the $FILENAME$ tag wherever it is asking for a filename.
You may have to put it in quotes, and also provide an extension i.e. $FILENAME$.TXT (will adopt the filename of the currently open drawing without the dwg, then add the txt extension.
Let me know if this doesn't make sense.
Hurricane for AutoCAD http://www.74mph.com FAQ at http://www.74mph.com/faq/faq.html Tutorials at http://www.74mph.com/tutorials.html |
|
|
n/a
deleted
12 Posts |
Posted - December 05 2012 : 11:45:10 PM
|
thanks, I think that is exactly what is required for my problem. the second problem I have is that I need to set the template and output location for the ATTEXT command. It seems that I am able to set the template file by running it once - meaning that it is somehow cached from the previous drawing, but I would like to set this in Hurricane. My LISP routine seems to be ignoring the output path though:
attext C T S:\Projects\07\7676\gis\Hurricane Development\templat.txt F S:\Projects\07\7676\gis\Hurricane Development\output\"$FILENAME$.TXT" _close
thanks for your feedback |
|
|
Admin
Administrator
652 Posts |
Posted - December 06 2012 : 07:25:34 AM
|
You might want to try it this way instead...
;BEGIN SCRIPT attext C T S:\Projects\07\7676\gis\Hurricane Development\templat.txt F S:\Projects\07\7676\gis\Hurricane Development\output\$FILENAME$.TXT ;END SCRIPT
If above doesn't work then try ;BEGIN SCRIPT attext C T S:\Projects\07\7676\gis\Hurricane Development\templat.txt F "S:\Projects\07\7676\gis\Hurricane Development\output\$FILENAME$.TXT" ;(Path in quotes above) END SCRIPT
The best way to diagnose, remember, is to hit F2, and look at the text window... it will show where it stalls... (Just copy-paste it in a response if you get stuck)
Hurricane for AutoCAD http://www.74mph.com FAQ at http://www.74mph.com/faq/faq.html Tutorials at http://www.74mph.com/tutorials.html |
|
|
n/a
deleted
12 Posts |
Posted - December 07 2012 : 03:38:48 AM
|
Hi Thanks for your help
; *************************************************************** ; HURRICANE 6.8.17 - SCRIPT CREATED 7/12/2012 : 4:40:00 PM ; *************************************************************** _SDI 0 _OPEN "s:\Projects\07\7676\gis\Hurricane Development\test2\110309 lot 557 Mujira.dwg" (SETVAR "MODEMACRO" "Drawing 1 of 4") TILEMODE 0 MSPACE STATUS attext C T S:\Projects\07\7676\gis\Hurricane Development\templat.txt F S:\Projects\07\7676\gis\Hurricane Development\output\110309 lot 557 Mujira.TXT _close
_SAVEAS "s:\Projects\07\7676\gis\Hurricane Development\test2\110309 lot 557 Mujira.dwg" Y _OPEN "s:\Projects\07\7676\gis\Hurricane Development\test2\110318 Lot 652 Wagari.dwg" (SETVAR "MODEMACRO" "Drawing 2 of 4") TILEMODE 0 MSPACE STATUS attext C T S:\Projects\07\7676\gis\Hurricane Development\templat.txt F S:\Projects\07\7676\gis\Hurricane Development\output\110318 Lot 652 Wagari.TXT _close
_SAVEAS "s:\Projects\07\7676\gis\Hurricane Development\test2\110318 Lot 652 Wagari.dwg" Y _OPEN "s:\Projects\07\7676\gis\Hurricane Development\test2\110318 Lot 800 Marrri Marri.dwg" (SETVAR "MODEMACRO" "Drawing 3 of 4") TILEMODE 0 MSPACE STATUS attext C T S:\Projects\07\7676\gis\Hurricane Development\templat.txt F S:\Projects\07\7676\gis\Hurricane Development\output\110318 Lot 800 Marrri Marri.TXT _close
_SAVEAS "s:\Projects\07\7676\gis\Hurricane Development\test2\110318 Lot 800 Marrri Marri.dwg" Y _OPEN "s:\Projects\07\7676\gis\Hurricane Development\test2\110502 Lot240 Bajamalu.dwg" (SETVAR "MODEMACRO" "Drawing 4 of 4") TILEMODE 0 MSPACE STATUS attext C T S:\Projects\07\7676\gis\Hurricane Development\templat.txt F S:\Projects\07\7676\gis\Hurricane Development\output\110502 Lot240 Bajamalu.TXT _close
_SAVEAS "s:\Projects\07\7676\gis\Hurricane Development\test2\110502 Lot240 Bajamalu.dwg" Y _SDI 0
|
|
|
n/a
deleted
12 Posts |
Posted - December 07 2012 : 03:50:29 AM
|
Hi,
I think it is the version with the quotes that doesn't work. the ATTEXT function works but the text output file is only to the directory in which the file is in. The drawings are not closing so I think that it has stalled in specifying the output path.. |
|
|
Admin
Administrator
652 Posts |
|
n/a
deleted
12 Posts |
Posted - December 09 2012 : 6:13:59 PM
|
Enter name of drawing to open <S:\Projects\07\7676\gis\Hurricane Development\test2\110318 Lot 800 Marrri Marri.dwg>: "s:\Projects\07\7676\gis\Hurricane Development\test2\110502 Lot240 Bajamalu.dwg"
Opening an AutoCAD 2007/LT 2007 format file. Regenerating layout. Regenerating model. Press ENTER to continue:
Command: Command: (SETVAR "MODEMACRO" "Drawing 4 of 4") "Drawing 4 of 4"
Command: TILEMODE
Enter new value for TILEMODE <0>: 0
Command: MSPACE
Already in model space.
Command: STATUS 5586 objects in S:\Projects\07\7676\gis\Hurricane Development\test2\110502 Lot240 Bajamalu.dwg Undo file size: 6058 bytes Model space limits are X: 0.000 Y: 0.000 (Off) X: 420.000 Y: 297.000 Model space uses X: 36448.943 Y: 154607.929 X: 36485.463 Y: 154664.941 **Over Display shows X: 36438.026 Y: 154598.835 X: 36494.095 Y: 154673.205 Insertion base is X: 0.000 Y: 0.000 Z: 0.000 Snap resolution is X: 10.000 Y: 10.000 Grid spacing is X: 10.000 Y: 10.000
Current space: Model space Current layout: A3 P(200) Current layer: "0" Current color: BYLAYER -- 7 (white) Current linetype: BYLAYER -- "Continuous" Current material: BYLAYER -- "Global" Current lineweight: BYLAYER Current elevation: 0.000 thickness: 0.000 Fill on Grid off Ortho off Qtext off Snap off Tablet off Object snap modes: Center, Endpoint, Insert, Intersection, Node, Tangent, Free dwg disk (S:) space: 212327.2 MBytes Free temp disk (C:) space: 350650.0 MBytes Free physical memory: 8965.9 Mbytes (out of 12285.6M). Free swap file space: 21050.3 Mbytes (out of 24569.3M).
Command: attext Enter extraction type or enable object selection [Cdf/Sdf/Dxf/Objects] <C>: C
Enter template file name <S:\Projects\07\7676\gis\Hurricane Development\templat.txt>: T
"T.txt": Can't find file.
Enter template file name <S:\Projects\07\7676\gis\Hurricane Development\templat.txt>: S:\Projects\07\7676\gis\Hurricane "Hurricane.txt": Can't find file.
Enter template file name <S:\Projects\07\7676\gis\Hurricane Development\templat.txt>: Development\templat.txt
"templat.txt": Can't find file.
Enter template file name <S:\Projects\07\7676\gis\Hurricane Development\templat.txt>: F
"F.txt": Can't find file.
Enter template file name <S:\Projects\07\7676\gis\Hurricane Development\templat.txt>: S:\Projects\07\7676\gis\Hurricane "Hurricane.txt": Can't find file.
Enter template file name <S:\Projects\07\7676\gis\Hurricane Development\templat.txt>: Development\output\110502 "110502.txt": Can't find file.
Enter template file name <S:\Projects\07\7676\gis\Hurricane Development\templat.txt>: Lot240 "Lot240.txt": Can't find file.
Enter template file name <S:\Projects\07\7676\gis\Hurricane Development\templat.txt>: Bajamalu.TXT
"Bajamalu.TXT": Can't find file.
Enter template file name <S:\Projects\07\7676\gis\Hurricane Development\templat.txt>: Enter extract file name <S:\Projects\07\7676\gis\Hurricane Development\test2\110502 Lot240 Bajamalu>: 1 records in extract file.
Command: ATTEXT Enter extraction type or enable object selection [Cdf/Sdf/Dxf/Objects] <C>:
Enter template file name <S:\Projects\07\7676\gis\Hurricane Development\templat.txt>: Enter extract file name <S:\Projects\07\7676\gis\Hurricane Development\test2\110502 Lot240 Bajamalu>: 1 records in extract file.
Command: _SAVEAS Current file format: AutoCAD 2007(LT 2007) Drawing Enter file format [R14(LT98<97)/2000(LT2000)/2004(LT2004)/2007(LT2007)/2010(LT2010)/Standards/DX F/Template] <R2007>: Save drawing as <S:\Projects\07\7676\gis\Hurricane Development\test2\110502 Lot240 Bajamalu.dwg>: "s:\Projects\07\7676\gis\Hurricane Development\test2\110502 Lot240 Bajamalu.dwg" A drawing with this name already exists. Do you want to replace it? <N> Y You are trying to save AEC objects to a previous version file format. This is not permitted.
These objects can be viewed in a previous version if Proxy Graphics are enabled, but AEC commands will be disabled.
Users of 2004, 2005 and 2006 versions should install an updated Object Enabler (available from www.autodesk.com/enablers) before opening these drawings. Previous versions will display error messages.
Command: _SDI Enter new value for SDI <0>: 0
|
|
|
n/a
deleted
12 Posts |
Posted - December 09 2012 : 8:30:43 PM
|
hi,
i think i have the problem. or at least part of it..
i think that i need to run -ATTEXT instead of ATTEXT in order to bypass the dialogue box.
in order to do this i think that i need to run filedia and set to 0
now I think am just back to my previous issue of specifying the output text file
---------------------------------------------------------------------- Enter name of drawing to open <.>: "s:\Projects\07\7676\gis\Hurricane Development\test\110318 Lot 488 Bajamalu.dwg"
Command: filedia Enter new value for FILEDIA <0>: 0 Command: -attext Enter extraction type or enable object selection [Cdf/Sdf/Dxf/Objects] <C>: C Enter template file name <S:\Projects\07\7676\gis\Hurricane Development\templat.txt>: "S:\Projects\07\7676\gis\Hurricane Development\templat.txt" Enter extract file name <S:\Projects\07\7676\gis\Hurricane Development\test\110318 Lot 488 Bajamalu>: "S:\Projects\07\7676\gis\Hurricane Development\output\110318 Lot 488 Bajamalu.TXT" 1 records in extract file. Command: -ATTEXT Enter extraction type or enable object selection [Cdf/Sdf/Dxf/Objects] <C>: Enter template file name <S:\Projects\07\7676\gis\Hurricane Development\templat.txt>: Enter extract file name <S:\Projects\07\7676\gis\Hurricane Development\test\110318 Lot 488 Bajamalu>: 1 records in extract file. Command: -ATTEXT Enter extraction type or enable object selection [Cdf/Sdf/Dxf/Objects] <C>: Enter template file name <S:\Projects\07\7676\gis\Hurricane Development\templat.txt>: Enter extract file name <S:\Projects\07\7676\gis\Hurricane Development\test\110318 Lot 488 Bajamalu>: _SAVEAS "C:\Program Files\Autodesk\AutoCAD Map 3D 2012\_SAVEAS.txt": Can't open file Command: -ATTEXT Enter extraction type or enable object selection [Cdf/Sdf/Dxf/Objects] <C>: "s:\Projects\07\7676\gis\Hurricane Development\test\110318 Lot 488 Bajamalu.dwg" Invalid option keyword. |
|
|
n/a
deleted
12 Posts |
Posted - December 09 2012 : 10:49:18 PM
|
Hi,
managed to get this running using the following:-
----------------------------------------------------------
TILEMODE 0 MSPACE STATUS filedia 0 -attext C "S:\Projects\07\7676\gis\Hurricane Development\templat.txt" "S:\Projects\07\7676\gis\Hurricane Development\output\$FILENAME$.TXT"
thanks |
|
|
Admin
Administrator
652 Posts |
|
|
Topic |
|