Does AutoCad support MS-SQL Server's User Defined Types?

Posted on 2006-05-26
Last Modified: 2008-03-17
I'm trying to design a database in MS-SQL that will link to AutoCad.  I would like to create some User Defined Types since MS SQL Server does not seem to have any Geometry Types.  Will AutoCad be able to handle it?

Question by:nebbles
    LVL 2

    Accepted Solution

    Sqlserver doesnot support for Gemotry types,
    LVL 13

    Expert Comment

    I think it could be accomplished if you created an interface between the types.

    for example you design a type

         x1 as double
         y1 as double
         z1 as double
         x2 as double
         y2 as double
         z2 as double

    Public Function CreateLine(x1, y1, z1, x2, y2, z2) As AcadLine
    Dim P1(2) As Double
    Dim P2(2) As Double
    P1(0) = x1
    P1(1) = y1
    P1(2) = z1
    P2(0) = x2
    P2(1) = y2
    P2(2) = z2

    CreateLine = ThisDrawing.ModelSpace.AddLine(P1, P2)
    End Function

    Then you can query your sql and pass the return values to your interfacing function for creating the geometry

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    Following a number of instances of re-installing Solidworks I thought that it may be a  good idea to detail the procedure that I follow each time to ensure a good stable install. Backup: Backup your system.  It goes without saying that this i…
    Our company has proprietary drawing files that we do not give to our customers for final documentation. Our customers now require that we give them these drawings. They understand that they are proprietary and do not require them to be in AutoCAD bu…
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now