CREATING EXTRACTION FILE NEED TO RENAME THE TXT AUTOMATICALLY

CREATING EXTRACTION FILE NEED TO RENAME THE TXT AUTOMATICALLY

Anonymous
Not applicable
1,208 Views
5 Replies
Message 1 of 6

CREATING EXTRACTION FILE NEED TO RENAME THE TXT AUTOMATICALLY

Anonymous
Not applicable

Using AutoCAD 2017

Caution!! inexperienced user

I'm trying to write a script using FILEDIA 0 and -ATTEXT to bypass all the prompts. The template file location doesn't seem to be that much of a issue. By leaving the extraction file prompt line in the command empty it places the extraction file in the same location as the .dwg (that's ok too). But when I go to the next drawing to run the same process it keeps the original file name from the first time I ran the script overwriting the last drawings extraction file.

If possible, can I insert into the script to change the .dwg name from drawing.dwg to drawing-holes.dwg, so it will name the extraction file how I need it, then of course change the drawing name back to the original prior to saving? My apologies if this is vague, I've been everywhere I can via the internet, but most of it seems to be a different language for a novice user like myself. attached is what I've got so far. Please help.



 

0 Likes
1,209 Views
5 Replies
Replies (5)
Message 2 of 6

john.vellek
Alumni
Alumni

Hi @Anonymous,

 

Can you attach a sample file(s) to run this script upon?  I think merely adding quotes around the filename might fix this but I would like to test and see for myself.


John Vellek


Join the Autodesk Customer Council - Interact with developers, provide feedback on current and future software releases, and beta test the latest software!

Autodesk Knowledge Network | Autodesk Account | Product Feedback
0 Likes
Message 3 of 6

Anonymous
Not applicable

the block the attext command is grabbing is in the lower right hand corner of the drawing. hope this helps. I'm leaving the office shortly (for the weekend) but can respond.

0 Likes
Message 4 of 6

john.vellek
Alumni
Alumni

Hi @Anonymous,

 

I see now what you are trying to do. Since this is really a customization type of routine I would suggest that we move your post to that forum if you approve.

 

Are you trying to run this script across multiple files and folders? If so, how are you doing that?

 

I found that I don't have to suppress the file dialog if I use the Action Recorder. This allows me to manually append the file name.  However, I think that this would be better accomplished in a LISP routine where you could concatenate the "HOLES" onto the dwgname.

 

Please select the Accept as Solution button if my post solves your issue or answers your question.


John Vellek


Join the Autodesk Customer Council - Interact with developers, provide feedback on current and future software releases, and beta test the latest software!

Autodesk Knowledge Network | Autodesk Account | Product Feedback
0 Likes
Message 5 of 6

Anonymous
Not applicable
Please move as you see fit
0 Likes
Message 6 of 6

Anonymous
Not applicable
The endgame is this:
To incorporate a number of tasks in a Final Plot button that automatically update the holes file in a location. Along with a material file as well as a welds file.. but hopefully I can tackle those once I've gained the knowledge from this first beast
0 Likes