Author Topic: Print Server Name Change?  (Read 16011 times)

0 Members and 1 Guest are viewing this topic.

SDETERS

  • Guest
Print Server Name Change?
« on: February 08, 2010, 04:17:06 PM »
We just changed our Print server so we changed the name of all of our printers.

Now Every drawing our Special group goes into says it can not find the (printername_hgrps_1) and it is going to default to none plot device has been subsituted.  This takes a long time.

Is there a way around this?  Is there a lisp or script that could be run so I can change the printer name when the drawing gets opened.  

Thanks Shane  
« Last Edit: February 08, 2010, 04:27:54 PM by SDETERS »

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: Print Server Name Change?
« Reply #1 on: February 08, 2010, 05:54:10 PM »
one might try using page setup overrides when publishing....for the short term
Be your Best


Michael Farrell
http://primeservicesglobal.com/

SDETERS

  • Guest
Re: Print Server Name Change?
« Reply #2 on: February 08, 2010, 06:02:15 PM »
That is what we are doing.

I did not know if there was an automated way of doing this or not?

Thanks for the feedback

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: Print Server Name Change?
« Reply #3 on: February 08, 2010, 06:22:13 PM »
Sadly' I've been pushed down this this path more than once by some 'others' IT folks renaming both file and print servers at regular random intervals. ;)
I never looked into a programmatic solution like say a LISP, or VBA routine that would read the CTAB Page setup information, and IF it wasn't using your new one would then Import said pagesetup PSETUPIN and set that current on any and all Layout tabs it encountered.

You may want to boost this up to the Code Red folks and see if this nut has already been cracked up there.
Be your Best


Michael Farrell
http://primeservicesglobal.com/

dgorsman

  • Water Moccasin
  • Posts: 2437
Re: Print Server Name Change?
« Reply #4 on: February 08, 2010, 06:32:43 PM »
As a work-around for things like this, I have created new page set-ups in a blank file and used TrueView to convert-in-place, to the same version, check the "set default set-up to none", and point to the template file.
If you are going to fly by the seat of your pants, expect friction burns.

try {GreatPower;}
   catch (notResponsible)
      {NextTime(PlanAhead);}
   finally
      {MasterBasics;}

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Print Server Name Change?
« Reply #5 on: February 08, 2010, 06:44:11 PM »
or if you wanted a solution while in the Drawing ..
Edit the FileName to suit your template

Code: [Select]
;;//---------------------------------------------------------------------------

(defun c:ChangePageSetups (/ old_expert)
    (setq old_expert (getvar "expert"))
    (setvar "expert" 5)
    ;; REVISE TO SUIT
    ;; (VL-CMDF "-psetupin" "PageSetupTemplate_FileName" "pageSetup_Name")
    (vl-cmdf "-psetupin" "c:/PageSetupTemplate.DWG" "*")
    (setvar "expert" old_expert)
    (princ)
)

;;//---------------------------------------------------------------------------
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

SDETERS

  • Guest
Re: Print Server Name Change?
« Reply #6 on: February 09, 2010, 08:51:00 AM »
This worked sort of good.

All we have in our pagesetup is *model*

it seems it does not like this so what I did is I went into our template and made a new pagesetup name

now I get the lisp to work now I need to set that new pagesetup name to current.  Like I said I do not know much lisp at all.  Would you please provide a couple extra lines to set my new pagesetup name to current.  Then I think I would be set.  Thanks for all the help and feedback.

JohnK

  • Administrator
  • Seagull
  • Posts: 10638
Re: Print Server Name Change?
« Reply #7 on: February 09, 2010, 09:43:52 AM »
not sure about the setting of a pagesetup current but here is a stripped down version of one that i use in my office.  Ive kept the error handling process in the `PSETUP-IN' routine for you to decide whether to keep or not.

Code: [Select]
(defun copy_page-setup (DwgName / psetups $acadver$ $typelib$ $classname$ $dbxDoc$)
  (setq $AcadVer$  (atoi (getvar "acadver"))
        $TypeLib$   (findfile "AxDb.dll")
        $ClassName$ (strcat "ObjectDBX.AxDbDocument" "." (itoa $AcadVer$))
        $dbxdoc$   (vla-GetInterfaceObject (vlax-get-acad-object) $ClassName$))

  (setq *acad* (vlax-get-acad-object))
  (setq *active-document* (vla-get-activedocument *acad*))
 
  (setq psetups (vla-get-plotconfigurations *active-document*))

  (vla-open $dbxdoc$ DwgName)
 
  (vlax-for x
            (setq dbxdoc-collection (vla-get-plotconfigurations $dbxdoc$))
            (setq name (vla-get-name x))
            (vla-copyobjects
              $dbxdoc$
              (vlax-safearray-fill
                (vlax-make-safearray vlax-vbobject '(0 . 0))
                (list (vla-item dbxdoc-collection name)))
              psetups ))

  (vlax-release-object $dbxdoc$)
  (princ)
  )

;; BEGIN MAIN
(defun c:psetup-in ( / *error* ERROR-LST-)
  ;;
  ;; BEGIN SETUP
       (setq
         ERROR-LST-
                    '("AUTOSNAP" "OSMODE" "APERTURE" "HPSPACE" "HPASSOC"
                      "MIRRTEXT" "AUPREC" "LUPREC" "DIMZIN" "CECOLOR" "CLAYER")
         ERROR-LST- (mapcar (function (lambda (a) (list 'setvar a (getvar a)))) ERROR-LST-)
       );_end setq

       (defun *error* (msg)
          (command) (command)
          (mapcar 'eval ERROR-LST-)
          )

  ;; END SETUP
  ;;

  ;;
  ;; BEGIN CODE

   (setq *acad-object* (vlax-get-acad-object))
   (setq *active-document* (vla-get-activedocument *acad-object*))
   ;;
   ;; delete existing pagesetups
   (vlax-map-collection (vla-get-plotconfigurations *active-document*) 'vla-delete)

   ;;
   ;; import the new ones
   (copy_page-setup "C:\\tmp\\Test-PageSetups-ABS08.dwt")

  ;; END CODE
  ;;

  ;;
  ;; BEGIN CLEANUP
 
  (*error* "")
  ;; END CLEANUP
  ;;
  (princ)
)
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

SDETERS

  • Guest
Re: Print Server Name Change?
« Reply #8 on: February 09, 2010, 10:34:11 AM »
Sorry I get an error saying "error: malformed list on input"  When I try to run this program.

I modified the code for my appropriate dwt file.

Is there anything else I need to add to it?  Sorry for being a pain in the a--.

Thanks 

JohnK

  • Administrator
  • Seagull
  • Posts: 10638
Re: Print Server Name Change?
« Reply #9 on: February 09, 2010, 11:41:02 AM »
no that just means that i dont have a parentheses or something (I messed up when i was deleting stuff). let me fix it.
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

JohnK

  • Administrator
  • Seagull
  • Posts: 10638
Re: Print Server Name Change?
« Reply #10 on: February 09, 2010, 11:43:48 AM »
*hummm* nope it seems okay. Are you sure you copied it correctly? I would copy and paste one more time to be sure.
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

SDETERS

  • Guest
Re: Print Server Name Change?
« Reply #11 on: February 09, 2010, 11:56:27 AM »
Yep I got it now.  I was the one who messed up copying and pasting.

I Still have the problem with the page setup manager wanting to use *model*.   Please see JPEG file.

 In my DWT file I have this set as for example *model* (ME) set to current.

It got the ME name but it did not set that name to current.

JohnK

  • Administrator
  • Seagull
  • Posts: 10638
Re: Print Server Name Change?
« Reply #12 on: February 09, 2010, 03:55:53 PM »
I stated that i didnt know of a way to set the page setup; they are just a collection of settings. However, you can manually set the plotting STUFF...

-e.g. Here is how to set the pc3 file or plotter used.
Code: [Select]
(vla-put-configname
  (vla-get-layout
    (vla-get-PaperSpace
      (vla-get-ActiveDocument
(vlax-get-object "AutoCAD.Application")
      )
    )
  )
  "Ghostscript.pc3"
)
;; or
(vla-put-configname
  (vla-get-layout
    (vla-get-PaperSpace
      (vla-get-ActiveDocument
(vlax-get-object "AutoCAD.Application")
      )
    )
  )
  "None"
)
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

SDETERS

  • Guest
Re: Print Server Name Change?
« Reply #13 on: February 09, 2010, 04:03:40 PM »
oh OK Sorry I get lost sometimes in the lisp programs.  I do not know how you come up with all of the calls and code and parentheses and such.  I really do appreciate your help. 

Thanks again  Off to look at your other suggestion.

JohnK

  • Administrator
  • Seagull
  • Posts: 10638
Re: Print Server Name Change?
« Reply #14 on: February 09, 2010, 05:32:20 PM »
Try this one:
Code: [Select]
(vla-put-configname
  (vla-get-layout
    (vla-get-PaperSpace
      (vla-get-ActiveDocument
(vlax-get-object "AutoCAD.Application")
      )
    )
  )
  "Ghostscript.pc3"
)
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

SDETERS

  • Guest
Re: Print Server Name Change?
« Reply #15 on: February 09, 2010, 05:57:17 PM »
I get an error I checked this a couple of times error: Automation Error. Invalid input

This is how I have the code at the current time.  I am missing something  Once again thanks for the help

Code: [Select]
(vla-put-configname
  (vla-get-layout
    (vla-get-PaperSpace
      (vla-get-ActiveDocument
(vlax-get-object "AutoCAD.Application")
      )
    )
  )
  "ME Assembly.pc3"
)
;; or
(vla-put-configname
  (vla-get-layout
    (vla-get-PaperSpace
      (vla-get-ActiveDocument
(vlax-get-object "AutoCAD.Application")
      )
    )
  )
  "None"
)

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Print Server Name Change?
« Reply #16 on: February 09, 2010, 06:06:18 PM »

Shane,
Are you running this after importing the PageSetups from your template ?

Can you post(attach to post) the drawing after you've imported the Page Setups ?

Which code are you importing the PageSetups with ?
and what is the qualified filename for your template with the correct PageSetups?
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

JohnK

  • Administrator
  • Seagull
  • Posts: 10638
Re: Print Server Name Change?
« Reply #17 on: February 09, 2010, 08:58:20 PM »
I get an error I checked this a couple of times error: Automation Error. Invalid input
<snip>
*humm?*

I'm interested in the answer to Kerry's questions too.



This is how I have the code at the current time.  I am missing something  Once again thanks for the help

Code: [Select]
(vla-put-configname
      ;<snip>
  "ME Assembly.pc3"
)
;; or
(vla-put-configname
       ;<snip>
  "None"
)


Oh no problem at all; im just sorry I cant help more.

If youre running the code exactly as you show it, then we need to make at least one change.
Could you in addition to Kerry's questions could you run this snip of code for me please and let me know if you get the Automation Error again.
Code: [Select]
(vla-put-configname
  (vla-get-layout
    (vla-get-PaperSpace
      (vla-get-ActiveDocument
(vlax-get-object "AutoCAD.Application")
      )
    )
  )
  "ME Assembly.pc3"
)



Kerry, do you think the space in the driver name would cause that error?
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Print Server Name Change?
« Reply #18 on: February 09, 2010, 09:03:47 PM »
< ... >

Kerry, do you think the space in the driver name would cause that error?

Hi John,

Thats one of the things I wanted to check when I got Shane's files .. I don't recall ever using a space in the name myself.
.. but AutoCAD does use spaces, SO probably not.


kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

JohnK

  • Administrator
  • Seagull
  • Posts: 10638
Re: Print Server Name Change?
« Reply #19 on: February 09, 2010, 09:16:12 PM »
w00t! I'm bookmarking this thread baby! The first time my mind was great. ...*blink* *gulp* dang, i hope it aint just statistics?!

TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

SDETERS

  • Guest
Re: Print Server Name Change?
« Reply #20 on: February 10, 2010, 08:51:30 AM »
Answers to Kerry questions.

Shane,
Are you running this after importing the PageSetups from your template ?

I am running this before.  SHould I be running it after?

Can you post(attach to post) the drawing after you've imported the Page Setups ?

I am attaching both files my template and a sample drawing.

Which code are you importing the PageSetups with ?

The one that se7en suggested.  Maybe I need some step by step instructions.  Dang I am a noob when it come to this lisp stuff sorry

and what is the qualified filename for your template with the correct PageSetups?

the name for the template file is "HG ME Template.dwt"

The example file that I am messing with is named EDST4_PART001.dwg

These will be both attached.  Um would it be better and or make life easier if there was no spaces in the file name?  I hoped I answered all of the questions.  Off to try se7en code

Once again thanks for the help.  I also attached a jpeg of the warning box I do not want showing up.  Our print named changed from hgrps1 to hgrps2
« Last Edit: February 10, 2010, 09:03:40 AM by SDETERS »

JohnK

  • Administrator
  • Seagull
  • Posts: 10638
Re: Print Server Name Change?
« Reply #21 on: February 10, 2010, 08:58:24 AM »
after.  Let me assemble one piece of code for you to run before i start downloading your files.
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

JohnK

  • Administrator
  • Seagull
  • Posts: 10638
Re: Print Server Name Change?
« Reply #22 on: February 10, 2010, 09:07:49 AM »
I gotta run, I got a fire here i have to put out. Run this and see what you get.

Code: [Select]
(defun c:psetup-test ( / )
   (setq *acad* (vlax-get-acad-object))
   (setq *active-document* (vla-get-activedocument *acad*))
   
       (defun copy_page-setup (DwgName / psetups $acadver$ $typelib$ $classname$ $dbxDoc$)
           (setq $AcadVer$  (atoi (getvar "acadver"))
                 $TypeLib$   (findfile "AxDb.dll")
                 $ClassName$ (strcat "ObjectDBX.AxDbDocument" "." (itoa $AcadVer$))
                 $dbxdoc$   (vla-GetInterfaceObject (vlax-get-acad-object) $ClassName$))
         
           (setq psetups (vla-get-plotconfigurations *active-document*))
         
           (vla-open $dbxdoc$ DwgName)
         
           (vlax-for x
                     (setq dbxdoc-collection (vla-get-plotconfigurations $dbxdoc$))
                     (setq name (vla-get-name x))
                     (vla-copyobjects
                       $dbxdoc$
                       (vlax-safearray-fill
                         (vlax-make-safearray vlax-vbobject '(0 . 0))
                         (list (vla-item dbxdoc-collection name)))
                       psetups ))
         
           (vlax-release-object $dbxdoc$)
           (princ)
           )
   ;;
   ;; delete existing pagesetups
   (vlax-map-collection (vla-get-plotconfigurations *active-document*) 'vla-delete)

   ;;
   ;; import the new ones
   (copy_page-setup "C:\\HG ME Template.dwt")

   (vla-put-configname
     (vla-get-layout
       (vla-get-PaperSpace
         (vla-get-ActiveDocument
    (vlax-get-object "AutoCAD.Application")
         )
       )
     )
     "ME Assembly.pc3"
   )

  (princ "\nType \"Psetup-test\" for the test.")
  (princ)
)
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

JohnK

  • Administrator
  • Seagull
  • Posts: 10638
Re: Print Server Name Change?
« Reply #23 on: February 10, 2010, 09:08:50 AM »
oh and note the path to your template, fix if you need to.
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

SDETERS

  • Guest
Re: Print Server Name Change?
« Reply #24 on: February 10, 2010, 09:28:51 AM »
Ok ran the code

It ran just fine.

I still get that JPEG error box I have attached in the previous post when I go to plot. 


JohnK

  • Administrator
  • Seagull
  • Posts: 10638
Re: Print Server Name Change?
« Reply #25 on: February 10, 2010, 09:58:25 AM »
Ok, i think i'm almost got this figured out. If im correct then all that is left is just a little bit of code.

Run this line please.
Code: [Select]
(vlax-map-collection (vla-get-layouts *active-document*) '(lambda ( x ) (vla-put-configname x "None")))
Try to plot.
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

SDETERS

  • Guest
Re: Print Server Name Change?
« Reply #26 on: February 10, 2010, 10:56:02 AM »
I ran the psetup-test then I ran your small line of code in your previous post.

This now sets my printer to none.  Great This eliminates my jpeg warning

What would be even better would be to set my Printer to the appropriate network printer. 

Could this be done by changing none to the printer name? 

JohnK

  • Administrator
  • Seagull
  • Posts: 10638
Re: Print Server Name Change?
« Reply #27 on: February 10, 2010, 11:00:17 AM »
lol we are on the same page my friend.
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

JohnK

  • Administrator
  • Seagull
  • Posts: 10638
Re: Print Server Name Change?
« Reply #28 on: February 10, 2010, 11:18:25 AM »
Here ya go.

Replace/fix the two lines as you need to.

Call the command from the command line like: psetup-reset
or
Call the command from a button or another lisp like: (c:psetup-reset)

Code: [Select]
(defun c:psetup-reset ( / )
   (setq *acad* (vlax-get-acad-object))
   (setq *active-document* (vla-get-activedocument *acad*))
   
       (defun copy_page-setup (DwgName / psetups $acadver$ $typelib$ $classname$ $dbxDoc$)
           (setq $AcadVer$  (atoi (getvar "acadver"))
                 $TypeLib$   (findfile "AxDb.dll")
                 $ClassName$ (strcat "ObjectDBX.AxDbDocument" "." (itoa $AcadVer$))
                 $dbxdoc$   (vla-GetInterfaceObject (vlax-get-acad-object) $ClassName$))
         
           (setq psetups (vla-get-plotconfigurations *active-document*))
         
           (vla-open $dbxdoc$ DwgName)
         
           (vlax-for x
                     (setq dbxdoc-collection (vla-get-plotconfigurations $dbxdoc$))
                     (setq name (vla-get-name x))
                     (vla-copyobjects
                       $dbxdoc$
                       (vlax-safearray-fill
                         (vlax-make-safearray vlax-vbobject '(0 . 0))
                         (list (vla-item dbxdoc-collection name)))
                       psetups ))
         
           (vlax-release-object $dbxdoc$)
           (princ)
           )
 
   ;;
   ;; delete existing pagesetups
   (vlax-map-collection (vla-get-plotconfigurations *active-document*) 'vla-delete)

   ;;
   ;; import the new ones
   (copy_page-setup "C:\\HG ME Template.dwt")

   ;;
   ;; apply the default printer driver to all the layouts
   (vlax-map-collection
     (vla-get-layouts *active-document*)
     '(lambda ( x ) (vla-put-configname x "ME Assembly.pc3")))

  ;;
  ;; release the obj's
  (mapcar 'vlax-release-object (list *acad* *active-document*))
 
  (princ)
)
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

SDETERS

  • Guest
Re: Print Server Name Change?
« Reply #29 on: February 10, 2010, 11:31:33 AM »
Great I think this will work.  Please stay tuned I may have a question about *.pc3 files.  Thanks again  This is great

JohnK

  • Administrator
  • Seagull
  • Posts: 10638
Re: Print Server Name Change?
« Reply #30 on: February 10, 2010, 12:04:59 PM »
k
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

SDETERS

  • Guest
Re: Print Server Name Change?
« Reply #31 on: February 10, 2010, 03:05:51 PM »
Great Thanks for the help it worked for what I was wanting to accomplish.  Now any Ideas to do the same with Autocad LT?  Sorry But they use both programs.

JohnK

  • Administrator
  • Seagull
  • Posts: 10638
Re: Print Server Name Change?
« Reply #32 on: February 10, 2010, 03:26:47 PM »
ummm no sorry. Ive never used LT so...what can we use besides a macro. Can we use diesel or something? ...nevermind. i dont know how to do what we just did with diesel anyways.
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: Print Server Name Change?
« Reply #33 on: February 10, 2010, 03:27:19 PM »
  Sorry But they use both programs.

somehow I thought this was for you... ;)

probably no luck making that happen in LT though.
Be your Best


Michael Farrell
http://primeservicesglobal.com/

JohnK

  • Administrator
  • Seagull
  • Posts: 10638
Re: Print Server Name Change?
« Reply #34 on: February 10, 2010, 03:28:14 PM »
I suppose you could use TrueView and set the default plotter to none.
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

SDETERS

  • Guest
Re: Print Server Name Change?
« Reply #35 on: February 10, 2010, 03:52:27 PM »
It is for a different department.  I was helping out them out. We use basic out of the box autocad.  Sad but I am the go to guy for Autocad questions when I can not answer them I come here to look for answers.  And answers you did give me which worked out great.

Please do not think about the LT I am very happy with what you all came up with.  Thanks Again.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Print Server Name Change?
« Reply #36 on: February 10, 2010, 04:02:01 PM »

in LT, what happens when you use PSETUPIN from the command line ?
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

SDETERS

  • Guest
Re: Print Server Name Change?
« Reply #37 on: February 10, 2010, 04:21:08 PM »
It brings up Pop Up Dialogue Box asking you to "Select Page Setup From File"  Then it gives you the option to select a dwg file.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Print Server Name Change?
« Reply #38 on: February 10, 2010, 04:29:04 PM »

OK

In your old drawings you have a PageSetup named ME, which uses the redundant plotter.

In your Template you have a PageSetup named ME, which uses the new plotter.

The new PC3 file is on your path.

yes ?

So ..

type PSETUPIN
select the template file
Select the Page setup ME
Import it , overriding the redundant definition.

Does that work for you ??

kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

SDETERS

  • Guest
Re: Print Server Name Change?
« Reply #39 on: February 11, 2010, 09:12:07 AM »
Ok I go to Psetupin

Select the template

Select the Pagesetup name

then I set the Pagesetup name to current

then Close out and the plot works.

My question can Lt run script files? 

Thanks

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: Print Server Name Change?
« Reply #40 on: February 11, 2010, 10:35:01 AM »
try one...

or just try ... SCRIPT @ command line and see IF LT likes it?
Be your Best


Michael Farrell
http://primeservicesglobal.com/

SDETERS

  • Guest
Re: Print Server Name Change?
« Reply #41 on: February 11, 2010, 11:42:52 AM »
Yes it will take script files.

Now Thanks for the help.  Off to try my hand at a script file.  Sweet.

DaveD

  • Guest
Re: Print Server Name Change?
« Reply #42 on: July 08, 2010, 06:48:31 PM »
If you can get LT to run scripts (or want to with CAD), here's an example of what we use to set up our plots:
----------------------------------
._TILEMODE 0
(load"plotview")
(c:plotview3042)
(setq expert (getvar "EXPERT"))(setvar "EXPERT" 2)
._-PSETUPIN
"PL_30x42.dwg"
"4500 30x42"
(setvar "EXPERT" expert)
._-PLOT
_No

4500 30x42

_No
_Yes
_No
._Preview
----------------------------------

LT wouldn't run the "plotview" routine but that simply sets up a named View to plot in the current dwg based on the paper size desired and could be scripted pretty easily as well.

As far as your original issue with getting the 'none' plotters after a server/plotter change, I've struggled with that several times, too.  PC3's are fragile and I think poorly thought I for what they have to do.  It seems they should just print to the local printer name no matter what server or driver info it carries with it.  Maybe I'm wrong.

Govert's tools ( http://www.noliturbare.com/plot-print/print-ctbs-and-more ) has a pc3 reader and if you open one up you can see the pc3 holds the driver version, IP address, name and server name.  I've tried doing a replace on the server name in a text file and bringing it back in to the pc3 reader to see if I could update them that way, with no luck.

Each time I've ended up having to rebuild each pc3 from scratch when we've had this happen.  I'm glad you found something that will help you out a bit, but I bet if someone (Govert?) could write an app that would find and replace strings in a pc3 they could sell it to CAD managers across the land... well, I'd buy one anyway.

Yes it will take script files.

Now Thanks for the help.  Off to try my hand at a script file.  Sweet.