Streamline your workflows and master BIM coordination! Program starts April 28!

Collaboration with other software
About model and data exchange with 3rd party solutions: Revit, Solibri, dRofus, Bluebeam, structural analysis solutions, and IFC, BCF and DXF/DWG-based exchange, etc.

Automatically Create DSN Connection

Anonymous
Not applicable
Hi Everyone

I have done this sort of thing with SQL Server but not with ArchiCAD

What i am trying to do is import data from a pln file to an access database

The import process works fine providing there is a DSN current

If no then I would like to have one create automatically

I am trying to use the following VB Script but keep getting prompted to start the Data Source Configuration Wizard

Here is when I am stuck


Private Declare Function ArchiCADConfigDataSource Lib "odbccp32.dll" _
(ByVal hwndParent As Long, _
ByVal fRequest As Integer, _
ByVal lpszDriver As String, _
ByVal lpszAttributes As String) As Long

Function Connect

lngResult = ArchiCADConfigDataSource(0, _
ODBC_ADD_SYS_DSN, _
"ArchiCad Plan ODBC Driver v9.0.0", _
"DSN=" & JDS_DSN_name & _
"Description=Plans" & Chr(0) & _
"PlanFile=C:\Test.pln" & Chr(0) & _
"MapBigIntToInt=false" & Chr(0) & Chr(0))
End Function
0 REPLIES 0