Thursday, June 03, 2010

Using the Sincpac Source Code in vb.NET

In the last post I went over how to create a command within the Sincpac source code. In this post I want to use the source code in a vb.NET project, mainly the Civil 3D Reminders pack. I really don’t like how hard it is to use the code in the help files to get the Civil 3D database and document. It really confuses me and I don’t like having to keep track of the versions. By using the Sincpac source code I can remove that frustration that I have.

The first step is to open the project and add the Quux.AcadUtilities.dll and Quux.C3DUtilities.dll files created by the Sincpac source code as references.

Next add the references to the top of the code, along with the other Imports.


Now the code from those dll’s will be available to use. So I’ll create an object for the AeccAppConnection that replaces the GetCivilObjects() in the original code.


Now I have to go through the code and replace the g_oCivil3DDoc with aeccConn.AeccDoc. Once done I have a much easier way of getting the Civil 3D document and one in which I don’t have to worry about the code. I can also use the other code within the Sincpac. If I wanted I could even recreate the code in and not have the entire Sincpac code come along.

While I haven’t fully exploited what I can do with the Sincpac source code this should provide you the steps to use the code within your vb.NET code.

No comments:


Blog Widget by LinkWithin