AutoCAD Map 3D Developer
Welcome to Autodesk’s AutoCAD Map 3D Developer Forums. Share your knowledge, ask questions, and explore popular AutoCAD Map 3D Developer topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Adding the SDF file to the map(Connect and "Add To MAP") via "Data Connect" (with .NET)

0 REPLIES 0
Reply
Message 1 of 1
cengizincebi
163 Views, 0 Replies

Adding the SDF file to the map(Connect and "Add To MAP") via "Data Connect" (with .NET)

I have a SDF file and I want to add to MAP with MAPCONNECT.
After, I am wanting execute "Add to Map".
I can't find it for 10 days, I could not do 

cengizincebi_0-1718190770981.png

 

 

 

Code is see the SDF file, but can not add to the Data Connect Window (mapconnect) in the code below
Can you help me?

 

I have next plan connect with .xlsx file :))
Maybe , after that I can add queries and Filters.
                                                                      -I will definitely add- :))))

 

 

 

CODE:

Private Sub Button8_Click(sender As Object, e As EventArgs) Handles Button8.Click


Dim connectionManager As OSGeo.FDO.IConnectionManager = FeatureAccessManager.GetConnectionManager()
Dim Provider As String = "OSGeo.SDF.4.2"
Dim conn As IConnection = connectionManager.CreateConnection(Provider)

Dim fileName As String = "C:\Temp\Test20.SDF"
conn.ConnectionInfo.ConnectionProperties.SetProperty("ReadOnly", False.ToString())
conn.ConnectionInfo.ConnectionProperties.SetProperty("File", fileName)
conn.ConnectionInfo.ConnectionProperties.SetProperty("MaxCacheSize", False.ToString())

Dim connInfo As IConnectionInfo = conn.ConnectionInfo
Dim properties As IConnectionPropertyDictionary = connInfo.ConnectionProperties

 

conn.Open()
conn.Close()

 

End Sub

Labels (5)
0 REPLIES 0

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators


AutoCAD Beta