How to launch BrisCAD from Excel VBA

1. How to launch BricsCAD from excel VBA(2003) 
2. Do I need to append "BricsCAD APP 11.0 Type Library", "BricsCAD DB 11.0 Type Library" or others from EXCEL VBA ? 
3. How can I draw polylin,text,dimension fom EXCEL VBA to BricsCAD? 
4. Any other examples in your Web site? 
5. Any eBook about BricsCAD VBA manuals ? 

Thanks,
Joe

Comments

  •  Here is a example of AutoCAD. 
    How to modify the code can run in BricsCAD?

    Public Graphics As AcadApplication Public Sub OpnAcad()     Dim strDrawing As String    On Error Resume Next    Set Graphics = GetObject(, "AutoCAD.Application")    If Err.Description > vbNullString Then        Err.Clear        Set Graphics = CreateObject("AutoCAD.Application")    End If    ' ACAD.Visible = True    strDrawing = "c:\0\Test.dwg"    Graphics.Documents.Open (strDrawing)     On Error GoTo 0End Sub      
  • Hi Joe,

    you need to update the application reference

    [code]Public CADapp As AcadApplication
     
    Public Sub OpenBcad()
     
        Dim strDrawing As String
        On Error Resume Next
        Set CADapp = GetObject(, "BricscadApp.AcadApplication")
        If Err.Description > vbNullString Then
            Err.Clear
            Set CADapp = CreateObject("BricscadApp.AcadApplication")
        End If
        strDrawing = "D:\Temp\TestDrawing.dwg"
        CADapp.Documents.Open (strDrawing)
        CADapp.Visible = True
        On Error GoTo 0
    End Sub[/code]

    Note you have to include BricsCAD in your references. See screen grab attached

    Regards,

    Jason Bourhill

    CAD Concepts

    imageExcel-References.png
  • Joe,

    Should of also said to look at the Developers Reference
    There are a number of examples under the COM section

    Regards,

    Jason Bourhill

    CAD Concepts
  • How can I draw "line" from Excel VBA to BrcisCAD?

    The example in attached file

    LaunchBricsCAD.xls

  • The only issue I ran into, when I did the same, was that both the BricsCAD and Excel programs need to be set to run as administrator.

    -Joe

  • Alikhan
    edited July 2023

    https://www.bricsys.com/bricscad/help/en_US/V17/DevRef/source/VBA_VBA.htm read this post yah it helped me thank you nice source
    Regards

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. Click one of the buttons on the top bar to get involved!