Results 1 to 7 of 7

Thread: Current Plot device?

  1. #1
    Certifiable AUGI Addict ccowgill's Avatar
    Join Date
    2004-08
    Location
    Iron Station, NC
    Posts
    3,198
    Login to Give a bone
    0

    Default Current Plot device?

    does anyone know how do find out what the current output device is in an AutoCAD drawing? I am trying to create a program that will plot to file if a certain plot device is specified, and need to know what to check for.

    Code:
       (command "-PLOT"	"N" ;Detailed plot configuration? [Yes/No] <No>: N
    	 ""   ;Enter a layout name or [?] <Layout1>:
    				   ""				   ;Enter a page setup name <>:
    				   ""				   ;Enter an output device name or [?] <current>: I would like to check this.
    	 "y"   ;Write the plot to a file [Yes/No] <N>: y
    	 file   ;Enter file name <maverickengineeringx5405RCp01001-Layout1.PLT>:
    	 "N"   ;Save changes to page setup [Yes/No]? <N> n
    	 "y"   ;Proceed with plot [Yes/No] <Y>:
    	)

  2. #2
    Administrator rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Earth
    Posts
    9,831
    Login to Give a bone
    0

    Default Re: Current Plot device?

    Try this:

    Code:
    (vla-get-ConfigName (vla-get-activelayout (vla-get-activedocument (vlax-get-acad-object))))
    R.K. McSwain | CAD Panacea |

  3. #3
    Certifiable AUGI Addict ccowgill's Avatar
    Join Date
    2004-08
    Location
    Iron Station, NC
    Posts
    3,198
    Login to Give a bone
    0

    Default Re: Current Plot device?

    that worked perfectly, thanks

  4. #4
    Administrator rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Earth
    Posts
    9,831
    Login to Give a bone
    0

    Default Re: Current Plot device?

    Keep in mind that IF you start to use a few functions or code that need access to the Active-X objects, you might want to create a function (such as the ones in the Developer Help*) that hold references to "acad" "active-document" "acad-preferences", etc., so that you aren't making these calls over and over.

    * Open the Developer Help (acad_dev.chm) and search for "Performance Considerations"
    R.K. McSwain | CAD Panacea |

  5. #5
    Certifiable AUGI Addict ccowgill's Avatar
    Join Date
    2004-08
    Location
    Iron Station, NC
    Posts
    3,198
    Login to Give a bone
    0

    Default Re: Current Plot device?

    Quote Originally Posted by rkmcswain
    Try this:

    Code:
    (setq outdev (vla-get-ConfigName (vla-get-activelayout (vla-get-activedocument (vlax-get-acad-object)))))
    when I use this line of code and inspect outdev, it puts the word "Space" where a blank " " should be, this is affecting my statement to check to see if outdev is equal to "ALL SIZES KIP PLOTTER.pc3" and so it never considers it equal. How do I fix this?

  6. #6
    Administrator rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Earth
    Posts
    9,831
    Login to Give a bone
    0

    Default Re: Current Plot device?

    Quote Originally Posted by ccowgill
    when I use this line of code and inspect outdev, it puts the word "Space" where a blank " " should be, this is affecting my statement to check to see if outdev is equal to "ALL SIZES KIP PLOTTER.pc3" and so it never considers it equal. How do I fix this?
    So it says ""ALLspaceSIZESspaceKIPspacePLOTTER.pc3" ?
    R.K. McSwain | CAD Panacea |

  7. #7
    Certifiable AUGI Addict ccowgill's Avatar
    Join Date
    2004-08
    Location
    Iron Station, NC
    Posts
    3,198
    Login to Give a bone
    0

    Default Re: Current Plot device?

    it had Space in the blank in VLIDE where I right clicked and inspected the variable after running the program, however on the command line when I checked the variable !outdev it shows up fine.

    The funny thing is, it was working fine earlier today, no it isn't, I dont know what the problem is.

    both drawings are using the same page setup to print, so the output device should be identical. they are using the same naming convention, just are different projects in different folders.
    Last edited by ccowgill; 2006-05-16 at 12:29 PM. Reason: problem re-appeared

Similar Threads

  1. None plot device has been substituted...
    By SCR73 in forum AutoCAD Plotting
    Replies: 9
    Last Post: 2011-05-05, 12:01 AM
  2. Plot Device Display
    By feargt in forum AutoCAD Plotting
    Replies: 4
    Last Post: 2009-05-14, 02:54 PM
  3. Current System Printer to be Designated as Plot Device
    By autocad.wishlist1734 in forum AutoCAD Wish List
    Replies: 0
    Last Post: 2009-01-13, 04:18 PM
  4. "Plot device" section missing from the Plot dialog box
    By laratoola85973 in forum AutoCAD General
    Replies: 6
    Last Post: 2005-07-28, 06:55 PM
  5. Plot device not being accepted?
    By Jordan Truesdell in forum AutoCAD Plotting
    Replies: 3
    Last Post: 2005-05-18, 10:02 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •