Ad

Tuesday, June 08, 2010

Migrating Civil 3D VBA to VB.NET

More AEC DevCamp Notes

Subassembly Migration

Recipe based approach to convert the code

Location for Subassembly and Pipe Rules Source Code: C:\Program Files (x86)\AutoCAD Civil 3D 2010\Sample\Civil 3D API

Help topic has Help topic on Converting VBA Subassemblies to .NET (In Developer’s Guide)

Three things to handle: Code, ATC File, Convert Subassembly from VBA to .NET

Code: Create, Copy Code, Port the Code

Has a list of items to change, an easy search and replace.

ATC File, change the values. No easy way to create it.

Has code example to convert the existing VBA Custom Subassemblies to .NET subassemblies. Need to do.

Pipe and Structure Rules

Rules run in order on the list, I tend to forget this. It is important to know to make sure if the rule needs to be done first or last.

Rules have different activities, Apply, Validate, and something else.

Piperules.xml contains the parameters of the rules, it is only run once and stored in memory. Can’t make changes to it on the fly.

File shown contains the strings. C:\ProgramData\Autodesk\C3D 2010\enu

Data types are now found in help. Tool Catalog Data Type Information (Not quite sure when this was added, may have been there the whole time I was looking for this information.

No transactions are in the code due to RulesTemplate

Set the networkState.LastElevation = oPipe.EndPoint.Z

[Structure] is correct, I wasn’t sure if it was or not.

No comments:

LinkWithin

Blog Widget by LinkWithin

Ad