Author Topic: Plot Dialog Question  (Read 3392 times)

0 Members and 1 Guest are viewing this topic.

V-Man

  • Bull Frog
  • Posts: 343
  • I exist therefore I am! Finally Retired!
Plot Dialog Question
« on: July 19, 2005, 09:28:07 AM »
I got a question. I am writing a plot logging lisp and I was wondering how do I gather up what the user selects in the plot dialog? (For Ex. if the user selects a particular PC3 file and paper size etc...  I want to know and keep track of what the user selects so that I can log it.)

Any ideas?
AutoCAD 9 - 2023, AutoCADMap 2008 - 2010, Revit 2012 - 2022, Autocad Civil 3D 2023

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
Plot Dialog Question
« Reply #1 on: July 19, 2005, 09:37:32 AM »
I believe you want the PlotConfiguration object via ActiveX.
TheSwamp.org  (serving the CAD community since 2003)

V-Man

  • Bull Frog
  • Posts: 343
  • I exist therefore I am! Finally Retired!
Plot Dialog Question
« Reply #2 on: July 19, 2005, 09:56:55 AM »
Quote

I believe you want the PlotConfiguration object via ActiveX.


Doesn't this just give you the settings that are assigned in the page setup?

What if there is no page setup assigned for the layout, during the plot command the user selects all kinds of settings like pc3, paper size, scale, extents, and copies. According to what the user selects in the dialog box, I want to track these settings and log them. Am I wrong about this?
AutoCAD 9 - 2023, AutoCADMap 2008 - 2010, Revit 2012 - 2022, Autocad Civil 3D 2023

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Plot Dialog Question
« Reply #3 on: July 19, 2005, 11:24:34 AM »
There is a VBA solution for 2004 and prior, but it does not work in 2005+ perhaps someone else could look at it and get a different view...
Code: [Select]
Dim PaperWidthList(10000) As Double
Dim PaperHeightList(10000) As Double
Dim MediaNameList(10000) As String
Dim plotDevicesList(10000) As String
Dim i As Integer
Sub AcadDocument_ObjectModified(ByVal Object As Object)
On Error Resume Next
If TypeName(Object) = "IAcadLayout" Then
i = i + 1
ThisDrawing.ActiveLayout.RefreshPlotDeviceInfo
MediaNameList(i) = ThisDrawing.ActiveLayout.CanonicalMediaName
plotDevicesList(i) = ThisDrawing.ActiveLayout.ConfigName
ThisDrawing.ActiveLayout.GetPaperSize PaperWidthList(i), PaperHeightList(i)
End If
End Sub
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

V-Man

  • Bull Frog
  • Posts: 343
  • I exist therefore I am! Finally Retired!
Plot Dialog Question
« Reply #4 on: July 19, 2005, 12:26:30 PM »
Hmmm. I don't need VBA even though that may be the way to go. I guess I will try to make it a little more simple. The only item I want to track now is what "PC3" did the user select during the plot dialog process, that's all. If I can extract this then really that's all I need since our PC3 files are named in such a way that the size is in the naming.
AutoCAD 9 - 2023, AutoCADMap 2008 - 2010, Revit 2012 - 2022, Autocad Civil 3D 2023

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Plot Dialog Question
« Reply #5 on: July 19, 2005, 02:24:09 PM »
Well, unfortunately, unless you want to go about setting up lisp reactors then there is probably not a real efficient way to manage it. I'll look at what more I can find .. maybe a way in lisp to attach a reactor to the AcDbLayout object and grab any changes ..
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

V-Man

  • Bull Frog
  • Posts: 343
  • I exist therefore I am! Finally Retired!
Plot Dialog Question
« Reply #6 on: July 19, 2005, 02:31:49 PM »
I do not have a problem working with reactors though I don't have any experience working with them but if that's the route I need to take then so be it. It never hurts to learn something new.. Thnx.
AutoCAD 9 - 2023, AutoCADMap 2008 - 2010, Revit 2012 - 2022, Autocad Civil 3D 2023

V-Man

  • Bull Frog
  • Posts: 343
  • I exist therefore I am! Finally Retired!
Plot Dialog Question
« Reply #7 on: July 21, 2005, 04:03:29 AM »
Ok, I just learned that I would like to accomplish this task via VBA. I have been doing alot of research on this solution and it has come to my attention that I should use VBA... I am trying agian to gather up all of the plotting information for plotting via the plot dialog and then log them into a MS Access database. How would I accomplish this. I am very new to VBA, I have only dabbed into it a few times.
AutoCAD 9 - 2023, AutoCADMap 2008 - 2010, Revit 2012 - 2022, Autocad Civil 3D 2023

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Plot Dialog Question
« Reply #8 on: July 21, 2005, 10:01:36 AM »
I believe Keith is correct in that a reactor is the only solution in lisp.
Other than replacing the plot dialopg box with one of your own.
Should you want to look into lisp here is a collection of stuff to look at.
« Last Edit: January 10, 2008, 01:34:17 PM by CAB »
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.