Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

Connect to a FDO via Plugin

Anonymous

Connect to a FDO via Plugin

Anonymous
Not applicable

Hello,

 

I am developing a plugin in which the user logs on to a Oracle server.

When the login is accepted I would like to create and connect a FDO to the same database.

 

Is there a way to create a FDO connection via a VB.Net plugin?

 

/ Per

0 Likes
Reply
Accepted solutions (1)
1,525 Views
7 Replies
Replies (7)

norman.yuan
Mentor
Mentor

When you say "plug-in", hopefully you mean DLL developed with AutoCAD .NET API. Yes, you can connect to FDO source, as long as the FDO provider is available in the computer. There are 2 ways to do that:

 

1. AutoCAD Map (since 2008/9) comes with "platform API" (or geospatial API) that deals with FDO (and more).

 

If you download AutoCAD Map ObjectARX SDK, you can find the API's documentation and sample code on how to connect AutoCAD with FDO data source and get FDO goemetries/data into AutoCAD Map.

 

You can also go to Autodesk's Infrastructure Modeling DevBlog and searcg for "FDO", which would bring you a few articles on this topic.

 

2. You can also bypass AutoCAD Map's platform API and directly use FDO API (AutoCAD installation get all FDO components installed).

 

In most cases, you'll go with 1.

Norman Yuan

Drive CAD With Code

EESignature

0 Likes

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

let me add some info's to Norman's suggestions:

 

You can download the ObjectARX kit for Map3D >>>there<<<

Within that you have samples that show's how to connect to source data (FDO) using API like the sample "Map Samples\Platform\BuildMap"

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2025
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Likes

Anonymous
Not applicable
Accepted solution

I found a solution.

 

This is what I did.

 

Dim connManager As OSGeo.FDO.IConnectionManager = OSGeo.FDO.ClientServices.FeatureAccessManager.GetConnectionManager()
Dim conn As OSGeo.FDO.Connections.IConnection = connManager.CreateConnection("Autodesk.Oracle.3.9")
conn.ConnectionString = "Service=SRID;Username=USERNAME;Password=PASSWORD;Datastore=SCHEMA"
conn.Open()

.....

conn.Close()

 

Hope this helps someone!

 

// Per

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

thx for your feedback and for showing your code, great!

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2025
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Likes

fieldguy
Advisor
Advisor

What reference is required for OSGeo.FDO.IConnectionManager?

0 Likes

norman.yuan
Mentor
Mentor

It is in assembly OSGeo.FDO.dll, which you can find with AutoCAD Map/Civil's installation location:

C:\...[AutoCAD201x]\Map\bin

 

To directly use FDO, you usually add references to:

 

OSGeo.FDO.dll

OSGeo.FDO.Common.dll

OSGeo.FDO.Geometry.dll

Norman Yuan

Drive CAD With Code

EESignature

0 Likes

fieldguy
Advisor
Advisor

Perfect - thank you! 

0 Likes