DesignCAD 3D Max 2027 box
Now available

DesignCAD 2027

Hatches that follow their boundaries, an on-screen dial to turn your model, and a way to find any command by name, in a clean Windows 11 look.

Visual basic lines

Started by casf2012, October 14, 2014, 04:37:19 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

casf2012

Hi.

Can any of you tell me what is the way to draw a line or circle on designcad using vb6? 8)

i try everything nothing works. :'(

tanks!

best regards,
Carlos


SolarFreak

This should do it (Please note, this was done in Visual Studio 2005, but should be pretty much identical).  I don't have a machine available with both VB6 and DC at the moment.  You are probably aware of the Object Browser in VB, it's you're best friend.  Presumably you've already found how to set a reference to the DC library as well.  If I've assumed too much, let me know and I'll back up.

        'Create application
        Dim dc As New DesignCAD.Application
        Dim dcDoc As DesignCAD.Document
        'Make app visible
        dc.Visible = True
        'Create new drawing
        dcDoc = dc.Documents.Add()
        'Set points for line
        dcDoc.CmdPoints.SetCommandPoint(0, 0, 0)
        dcDoc.CmdPoints.SetCommandPoint(0, 10, 0)
        'Draw line
        dcDoc.Line.Draw()

        'Pause so you can play...
        Stop

        'Close Up
        dcDoc.Close(False)
        dc.Quit()

casf2012

thanks for the help. 8)

now i just modify some things because vb6.

best regards