Grasshopper

algorithmic modeling for Rhino

Hi all


I found this video and wanted to know how can I connect grasshopper with Autocad and back, I see that it is possible, but I think the Nathan Miller's component is not available, LaunchAUTOCAD.

Anyone know if there is another way? please thanks

https://vimeo.com/15700150

Views: 2432

Reply to This

Replies to This Discussion

This is my VB script, working in W7-64 and rhino5-64, well it is not really my, I worked from Nathan Miller codes. Thanks Nath . I attached gh file

Private Sub RunScript(ByVal aCommand As String, ByVal execute As Boolean, ByRef Done As Object)

    'open autocad 2013 (in this case) FIRST
    'manage assemblies:
    'Autodesk.AutoCAD.Interop.dll
    'Autodesk.AutoCAD.Interop.Common.dll
    'in C:\Program Files\Autodesk\AutoCAD 2013 in my PC
    Dim DoneYes As String = Nothing
    print(DoneYes)

    If execute = True Then
      Done = acommand 'show in Done pannel What it did
      Dim acApp As AcadApplication

      'the correct progID for AutoCAD 2010 is "AutoCAD.Application.18"
      'the correct progID for AutoCAD 2013 is "AutoCAD.Application.19"
      Dim progID As String = "AutoCAD.Application"

      acApp = Marshal.GetActiveObject(progID)
      acApp.Visible = True
      acApp.ActiveDocument.SendCommand(acommand)
      DoneYes = "AutoCAD command executed!"
      print(DoneYes)
    End If

Attachments:

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

© 2020   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service