+ Reply to Thread
Results 1 to 10 of 10
  1. #1
    Senior Member
    Using
    AutoCAD 2007
    Join Date
    Apr 2008
    Posts
    258

    Default Make commandbutton called plot

    Registered forum members do not see this ad.

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

  2. #2
    Senior Member
    Computer Details
    flowerrobot's Computer Details
    Operating System:
    Windowns 7
    Computer:
    Lenovo W520
    Discipline
    Mechanical
    flowerrobot's Discipline Details
    Occupation
    Cad Manger
    Discipline
    Mechanical
    Using
    Mechanical 2013
    Join Date
    Sep 2007
    Location
    Sydney
    Posts
    384

    Default

    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

  3. #3
    Senior Member
    Using
    AutoCAD 2007
    Join Date
    Apr 2008
    Posts
    258

    Default

    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

  4. #4
    Senior Member Zorg's Avatar
    Computer Details
    Zorg's Computer Details
    Operating System:
    WinXP & Vista64
    CPU:
    AMD X2 2.6GHz
    RAM:
    2GB
    Graphics:
    512Mb SLI
    Primary Storage:
    500GB + 1TB External
    Monitor:
    19"
    Using
    AutoCAD 2008
    Join Date
    Apr 2009
    Location
    United Kingdom
    Posts
    301

    Default

    Quote Originally Posted by MR MAN View Post
    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
    Voila! The ZF-1.

  5. #5
    Quantum Mechanic Lee Mac's Avatar
    Computer Details
    Lee Mac's Computer Details
    Operating System:
    Windows 7 Ultimate (32-bit)
    Discipline
    Multi-disciplinary
    Lee Mac's Discipline Details
    Discipline
    Multi-disciplinary
    Details
    Custom Programming / Software Customisation
    Using
    AutoCAD 2013
    Join Date
    Aug 2008
    Location
    London, England
    Posts
    15,816

    Default

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

    With Mathematics there is the possibility of perfect rigour, so why settle for less?

    Just another Swamper

  6. #6
    Senior Member
    Using
    AutoCAD 2007
    Join Date
    Apr 2008
    Posts
    258

    Default

    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

  7. #7
    Super Member SEANT's Avatar
    Using
    AutoCAD 2012
    Join Date
    Aug 2005
    Location
    Rhode Island
    Posts
    1,971

    Default

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

  8. #8
    Senior Member
    Using
    AutoCAD 2007
    Join Date
    Apr 2008
    Posts
    258

    Default

    Can You Please Explain More Seant?
    How Can I Make It Exactly?


    Thanks For Help

  9. #9
    Super Member SEANT's Avatar
    Using
    AutoCAD 2012
    Join Date
    Aug 2005
    Location
    Rhode Island
    Posts
    1,971

    Default

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

    Code:
    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

  10. #10
    Senior Member
    Using
    AutoCAD 2007
    Join Date
    Apr 2008
    Posts
    258

    Default

    Registered forum members do not see this ad.

    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

Similar Threads

  1. Is there anyway to make a program make an edited dimension standout?
    By BLOACH85 in forum AutoLISP, Visual LISP & DCL
    Replies: 7
    Last Post: 27th May 2009, 05:42 pm
  2. Working with so called "adaptive" wiring
    By Devented in forum Autodesk Inventor
    Replies: 7
    Last Post: 28th Apr 2009, 04:47 pm
  3. I don't know what its called that I need help with sorry
    By malachai in forum AutoCAD Beginners' Area
    Replies: 13
    Last Post: 22nd Jan 2008, 04:09 pm
  4. What are thsse things called?
    By JamFam in forum AutoCAD Beginners' Area
    Replies: 6
    Last Post: 25th Mar 2006, 05:20 am
  5. Looking for a block - not sure what it's called in English
    By roel in forum AutoCAD Drawing Management & Output
    Replies: 3
    Last Post: 7th Mar 2006, 10:40 am

Bookmarks

Posting Permissions

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