How to access AutoCAD 2004 with accont16.arx

Discussion in 'AutoCAD' started by aryan2000, Feb 25, 2005.

  1. aryan2000

    aryan2000 Guest

    Hi there and thanks in advanced,

    I have seen the info so far in this section on using accont.arx with a VB6 ocx, but I can't find anything on how do you access AutoCAD from your ocx.
    eg. I want to click a button to insert a blockreference into the drawing from dockable container + ocx? normally I use
    Set acBlockRef=ThisDrawing.ModelSpace.InsertBlock(........)

    How is this done with accont16.arx + ocx


    This is all I have at the moment in m ocx

    Dim WithEvents dockContainer As AcadDockableContainer3
    Implements IRetrieveDockableContainer2

    Private Sub IRetrieveDockableContainer2_SetDockContainer(ByVal acCont As AC_CONT.IAcadDockableContainer2)

    Dim intArrayPosition(0 To 3) As Integer


    Set dockContainer = acCont
    dockContainer.EnableDockPositions = acDockAny 'acDockLeft + acDockRight

    intArrayPosition(0) = 50 ' Left
    intArrayPosition(1) = 50 ' Top
    intArrayPosition(2) = 300 ' Right
    intArrayPosition(3) = 350 ' Bottom

    dockContainer.SetPreferredDockPosition acFloating, intArrayPosition
    dockContainer.AutoHide = True
    End Sub
     
    aryan2000, Feb 25, 2005
    #1
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.