Jump to content

Recommended Posts

Posted

how can i make a commandbutton called plot when i press on it plot setup appear to me?

Posted

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

Posted

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

Posted
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

Posted

Mr MAN, Are you saying you want to bypass the plot setup and just have a "plot" button?

Posted

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

Posted

Instead of SendCommand, have you looked into the DisplayPlotPreview method of the Application.Document.Plot object (ThisDrawing.Plot.DisplayPlotPreview acFullPreview).

Posted

Can You Please Explain More Seant?

How Can I Make It Exactly?

 

 

Thanks For Help

Posted

Sadly, it appears that Autodesk has managed to break the DisplayPlotPreview method somewhere between AutoCAD 2004 and 2009. :x

 

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

Posted

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

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...