MR MAN Posted June 10, 2009 Posted June 10, 2009 how can i make a commandbutton called plot when i press on it plot setup appear to me? Quote
flowerrobot Posted June 10, 2009 Posted June 10, 2009 In your cui, creat a button with some thing like "^^_plot", i belive or get the button that is already "plot" or maybe "print", and place that where you want Quote
MR MAN Posted June 10, 2009 Author Posted June 10, 2009 iam sorry i will explain more i have a form in vba and have commandbutton called plot i need press on it to get plot setup i try sendcommand but it work after i close my program is there any way to run it with my program thanks for help Quote
Zorg Posted June 10, 2009 Posted June 10, 2009 iam sorry i will explain more i have a form in vba and have commandbutton called plot i need press on it to get plot setup i try sendcommand but it work after i close my program is there any way to run it with my program thanks for help Not, entirely sure what sort of end result you are after but if it's a button that will plot from a plot setup saved somewhere like 'A0', 'A1', 'A2', 'A3 then you need a lisp routine that wil ldo that for you Quote
Lee Mac Posted June 10, 2009 Posted June 10, 2009 Mr MAN, Are you saying you want to bypass the plot setup and just have a "plot" button? Quote
MR MAN Posted June 13, 2009 Author Posted June 13, 2009 IAM SORRY FOR LATE IN REPLY DEAR LEE MAC I MAKE A BUTTON ITS NAME IS PLOT AS SHOWN Private Sub CommandButton5_Click() UserForm1.Hide ThisDrawing.SendCommand "_plot" & vbCr UserForm1.Show End Sub IT OPEN MENU OF PLOT FOR ME UNTIL I CHOOSE WHAT I NEED MY PROBLEM IS WHEN I NEED TO PREVIEW OR MAKE PLOT AREA NO ACTION TAKEN UNTIL I CLOSE MY PROGRAM HAVE ANY IDEA TO SOLVE THIS THANKS FOR HELP Quote
SEANT Posted June 13, 2009 Posted June 13, 2009 Instead of SendCommand, have you looked into the DisplayPlotPreview method of the Application.Document.Plot object (ThisDrawing.Plot.DisplayPlotPreview acFullPreview). Quote
MR MAN Posted June 13, 2009 Author Posted June 13, 2009 Can You Please Explain More Seant? How Can I Make It Exactly? Thanks For Help Quote
SEANT Posted June 13, 2009 Posted June 13, 2009 Sadly, it appears that Autodesk has managed to break the DisplayPlotPreview method somewhere between AutoCAD 2004 and 2009. Sub DisplayPlotPreview() Dim objPlot As AcadPlot Dim AddedLayouts() As String Dim LayoutList As Variant Dim oLayout As AcadLayout Dim ArraySize As Integer Dim objConfig As AcadPlotConfiguration Dim colPlotConfigs As AcadPlotConfigurations Set colPlotConfigs = ThisDrawing.PlotConfigurations If colPlotConfigs.count = 0 Then colPlotConfigs.Add "TestConfig" End If Set objConfig = ThisDrawing.PlotConfigurations.Item("TestConfig") For Each oLayout In ThisDrawing.Layouts ArraySize = ArraySize + 1 ReDim Preserve AddedLayouts(1 To ArraySize) AddedLayouts(ArraySize) = oLayout.Name Next LayoutList = AddedLayouts Set objPlot = ThisDrawing.Plot objPlot.SetLayoutsToPlot LayoutList objPlot.DisplayPlotPreview acFullPreview 'works in 2004, error in 2009 End Sub Quote
MR MAN Posted June 14, 2009 Author Posted June 14, 2009 THANKS SEANT BUT IT DOESN'T WORK WITH AUTOCAD 2007 objPlot.DisplayPlotPreview acFullPreview 'works in 2004, error in 2009 THANK YOU AGAIN FOR YOUR HELP Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.