Results 1 to 3 of 3

Thread: Linking AUtocad 3D Model with VB6

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2001
    Location
    Malaysia
    Posts
    2

    Linking AUtocad 3D Model with VB6

    I've created 3D model of a robotic arm using Autocad 2000. I would like to control the movements of the robot arm using VB6. Can anyone tell me what should I do to achieve this?

    Or is there any sites regarding 3D robot arm simulation that uses Autocad and VB6?

    I really need help in this. Pls tell me!

  2. #2
    Member
    Join Date
    Mar 1999
    Location
    España
    Posts
    45
    Hello,
    You can control AutoCAD 2000 from VB using Autocad's Object model. You have to create an object and init it. This is my code to start to use AutoCAD controled by VB. If ypu want more help you can use the Autocad's help and find "Application". I don't know anything about your robot arm, but I hope this will help you. Bye.

    Code:

    Public Sub Inicializar()
    Dim N As Integer
    Dim cont As Long
    Dim NombFAC As Integer
    On Error Resume Next

    cont = 1000000
    repetir:
    Set AppACAD = Nothing
    Set AppACAD = GetObject(, "AutoCAD.Application")

    If AppACAD Is Nothing Or Err Then
    Err.Clear
    Set AppACAD = CreateObject("AutoCAD.Application")
    If Err Then
    Beep
    cont = cont - 1
    If cont <= 0 Then
    N = MsgBox("AutoCAD no responde,¿Desea Reintentar la conexión?", vbCritical + vbYesNo, NombFAC)
    If N = vbYes Then
    Err.Clear
    GoTo repetir
    End If
    Exit Sub
    Else
    GoTo repetir
    End If
    End If
    End If

    Set AppACAD = Nothing
    Set AppACAD = GetObject(, "AutoCAD.Application")

    AppACAD.Visible = True

    On Error GoTo 0

    End Sub

  3. #3

    Thread Starter
    New Member
    Join Date
    Jul 2001
    Location
    Malaysia
    Posts
    2

    Thanks

    Hello Roberto,
    Thanks for your help. I hope this will help me in my project.

    If I need anymore help, I hope I can ask you. Thanks again.

Posting Permissions

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



Click Here to Expand Forum to Full Width