TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: V-Man 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?
-
I believe you want the PlotConfiguration object via ActiveX.
-
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?
-
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...
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
-
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.
-
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 ..
-
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.
-
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.
-
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 (http://theswamp.org/lilly_pond/cab/plotstuff.lsp?nossi=1) to look at.