Author Topic: Batch spooling process  (Read 3632 times)

0 Members and 1 Guest are viewing this topic.

Offline AlinaTopic starter

  • Premier Member
  • *****
  • Posts: 922
  • Country: us
  • Gender: Female
Batch spooling process
« on: May 16, 2018, 03:07:01 AM »
Hello cad guys,
I got a few questions on batch spooling process
1. Is there a way to do batch plotting with an option to rename pdfs before they plot?
2.  I did batch spooling and after my cad crashed all pieces in the main model were reset to the original item number. Since tables were produced now I need to assign the same part numbers that were created in spool for my pipe cut list report. The workaround would be copy all the spools individually and paste into the main model since they have correct info for my reports but I was hoping to find a better solution
3. When I make batch spooling, it creates and opens every spool but is there a way to create spools the same way without having cad to open each file?
4. Is it possible to change color after spool has been defined? For example, I was defining spools and decided to change spool number 2 to spool number 3, I did match properties from fab toolbar to the correct name but the color did not adjust. “setspoolcol” command would not do what I need. I can redefine spools but was hoping to run a command and make a quick fix.

I would be really hapy to hear your feedback! Many thanks!


Offline Darren Young

  • Premier Member
  • *****
  • Posts: 2081
  • Country: us
  • Gender: Male
    • BIM There Done That.
Re: Batch spooling process
« Reply #1 on: May 16, 2018, 15:23:53 PM »
1) I'm assuming you're looking for a completely automated option. Not aware of one but it could be done if you write it yourself. Likely just as easy to rename the PDF's manually or from a Batch file then merge them all together into a single PDF and print manually. Really depends how you need them named as well. They being named after some information that's already available in the drawing or randomly like "Bob.pdf"...that's would be harder to do automated.

2) Assembling them back together is likely the approach I'd take. If there were enough of them, I'd likely use Lisp and or AutoCAD Script files (*.SCR) to automate it.

3) That would be pretty tough to automate without opening them. It is possible to run a "headless" version of AutoCAD which is essentially AutoCAD running without a User Interface. Technically you're still opening the drawings anyway but because there's no graphics to process for display, you can run through 1000's of drawings in a few minutes. I'm not sure CADmep will run in this environment however. Even if it did, seems like this would be very difficult to automate. Technically doable but not very practical.  Spoolgen/IsoGen can automate spooling but you're looking at roughly $30k for licensing if I remember correctly.

4) See the attached COD Script. Run this script and set the color. Then use the SETSPOOLCOL command.

Code: [Select]
requires task.selection
dim SplClr = Inputbox("Enter Spool Color (1-256):", "Spool Color", "")

if SplClr < 1 or SplClr > 256 then
   debug "Error: Invalid Cpool Color."
endif

dim loop = 1
task.beginprogress(task.selection.count)
while loop <= task.selection.count
  dim item = task.selection[loop]
  loop = loop + 1
  item.spoolcolour = SplClr
end while

Offline AlinaTopic starter

  • Premier Member
  • *****
  • Posts: 922
  • Country: us
  • Gender: Female
Re: Batch spooling process
« Reply #2 on: May 16, 2018, 16:17:20 PM »
Thanks Darren, I will give it a shot later today!

Offline davidratx

  • Premier Member
  • *****
  • Posts: 1401
  • Country: us
  • Gender: Male
Re: Batch spooling process
« Reply #3 on: May 16, 2018, 17:11:22 PM »

3) That would be pretty tough to automate without opening them. It is possible to run a "headless" version of AutoCAD which is essentially AutoCAD running without a User Interface. Technically you're still opening the drawings anyway but because there's no graphics to process for display, you can run through 1000's of drawings in a few minutes. I'm not sure CADmep will run in this environment however. Even if it did, seems like this would be very difficult to automate. Technically doable but not very practical.  Spoolgen/IsoGen can automate spooling but you're looking at roughly $30k for licensing if I remember correctly.

I think maybe just closing the .dwg automatically after its been created would be sufficient. In the spool.ini file, look for "CloseDWG" and set the value to 1. This will just close the files after its been created so you dont end up with 50 open files.
David Ronson
TDIndustries Director of Construction Technologies
Windows 10 - Revit - AutoCAD - CADmep - ESTmep - CAMduct - GTP Stratus

Offline Darren Young

  • Premier Member
  • *****
  • Posts: 2081
  • Country: us
  • Gender: Male
    • BIM There Done That.
Re: Batch spooling process
« Reply #4 on: May 16, 2018, 18:33:17 PM »
The programmer in my assumed they were already being closed, just that they were wanted to be created without opening in the first place.

There's also a CLOSEALL and CLOSEALLOTHER commands but altering the Spool.Ini works too for those that don't like over complicating things like myself.

Offline AlinaTopic starter

  • Premier Member
  • *****
  • Posts: 922
  • Country: us
  • Gender: Female
Re: Batch spooling process
« Reply #5 on: May 16, 2018, 18:39:57 PM »
The thing is that after you batch a lot of spools and they open right away it may make cad crash.
So, I was trying to avoid this

Offline acad2015

  • Full Member
  • ***
  • Posts: 116
  • Country: us
  • Gender: Male
Re: Batch spooling process
« Reply #6 on: May 16, 2018, 19:53:45 PM »
Sorry if I am missing something here, but if you change the "CloseDWG" variable in the spool ini file to 0, then it will close each spool after creating it. So you can batch spool as many as you'd like and cad won't crash.

Offline davidratx

  • Premier Member
  • *****
  • Posts: 1401
  • Country: us
  • Gender: Male
Re: Batch spooling process
« Reply #7 on: May 16, 2018, 20:10:13 PM »
Sorry if I am missing something here, but if you change the "CloseDWG" variable in the spool ini file to 0, then it will close each spool after creating it. So you can batch spool as many as you'd like and cad won't crash.
0 = No, 1 = Yes
David Ronson
TDIndustries Director of Construction Technologies
Windows 10 - Revit - AutoCAD - CADmep - ESTmep - CAMduct - GTP Stratus

Offline acad2015

  • Full Member
  • ***
  • Posts: 116
  • Country: us
  • Gender: Male
Re: Batch spooling process
« Reply #8 on: May 16, 2018, 20:13:34 PM »
Sorry if I am missing something here, but if you change the "CloseDWG" variable in the spool ini file to 0, then it will close each spool after creating it. So you can batch spool as many as you'd like and cad won't crash.
0 = No, 1 = Yes
Excuse me for my mistake. Thanks Dave.

Offline AlinaTopic starter

  • Premier Member
  • *****
  • Posts: 922
  • Country: us
  • Gender: Female
Re: Batch spooling process
« Reply #9 on: May 16, 2018, 20:22:27 PM »
Worked great for me! Thank you very much!!!!!

Offline mdomer

  • Full Member
  • ***
  • Posts: 162
  • Country: us
  • Gender: Male
Re: Batch spooling process
« Reply #10 on: Aug 15, 2019, 19:19:31 PM »
How can I make a script run while batch spooling? I see the check box option, but not sure what to do with it.

I tried pathing it to my script folder, but it appears to accept a limited number of characters...

Offline bknapton

  • Premier Member
  • *****
  • Posts: 968
  • Country: us
  • Gender: Male
    • Mared Mechanical
Re: Batch spooling process
« Reply #11 on: Aug 16, 2019, 17:38:23 PM »
Is there a window for you to type in script name after checking run script?
Fabrication 2019