• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 220
  • Last Modified:

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

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?

Cheers
0
nebbles
Asked:
nebbles
1 Solution
 
SKumar_1981Commented:
No,
Sqlserver doesnot support for Gemotry types,
regards,
skumar
0
 
Corey ScheichDeveloperCommented:
I think it could be accomplished if you created an interface between the types.

for example you design a type

MySQLLineType
     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
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now