I just realized that there's no nice easy Import method on the PlotConfigurations collection. Anyone have a good way to get Pagesetups into the current dwg from a dwt that they would share? Thank you. -- James Wedding, P.E. IT Manager Jones & Boyd, Inc. Dallas, TX XP/2 on P4-3.4/1G LDT2005+C3D http://au.autodesk.com Sign up now for AU2004!
here is how I do it. sorry its lisp. (defun cageSetup30x42 () (setq cmdeko (getvar "cmdecho")) (setvar "cmdecho" 0) (setq emode (getvar "EXPERT"))(setvar "EXPERT" 2) (setq filepath "k:/cad standards/templates/friedmutter group sheet 30x42.dwt") (command "filedia" "0") (setq setups "DWF 30x42,Xerox 8855 30x42 Half Side (thin),Xerox 8855 30x42,Xerox 8855 30x42 Half Size,Xerox 8855 30x42 Vellum,PDF 30x42") (command "-psetupin" filepath setups) (setvar "Expert" emode) (setvar "cmdecho" cmdeko) (princ) ) Bill Debevc
Thanks. Just FYI, you can replace the list of pagesetups with a * and it imports them all. -- James Wedding, P.E. IT Manager Jones & Boyd, Inc. Dallas, TX XP/2 on P4-3.4/1G LDT2005+C3D http://au.autodesk.com Sign up now for AU2004!
OK, nevermind......I didn't test this enough. It brings the name in just fine, but selecting it in the Page Setup/Plot dialog gives an error......working out why now.
Found it.....replace the CommandButton1_Click code with this: Code: Private Sub CommandButton1_Click() Dim I As Integer Dim oCfgNew As AcadPlotConfiguration Dim oCfg As AcadPlotConfiguration With ListBox2 For I = 0 To .ListCount - 1 If .Selected(I) = True Then On Error Resume Next Set oCfgNew = ThisDrawing.PlotConfigurations.Item(.List(I, 0)) If Err.Number <> 0 Then Set oCfgNew = ThisDrawing.PlotConfigurations.Add(.List(I, 0)) End If Err.Clear On Error GoTo 0 Set oCfg = oDBX.PlotConfigurations.Item(.List(I, 0)) oCfgNew.CopyFrom oCfg End If Next End With End Sub