Novedge Pulse
The heartbeat of the Graphics & Design community!
Join Pulse
If you would like to be included in Pulse, please submit your news, press releases, or blog URL to pulse@novedge.com
 
Novedge reserves the right to exclude certain items from Pulse.
Novedge

Novedge Pulse — Chris Fugitt

Blog post: “Point Creation COM Style”

View Chris Fugitt's RSS feedView Chris Fugitt's profile on LinkedIn
Oct 12, 12 — Civil 3D Reminders
Point Creation COM Style
Here is an example on how to create a point in Civil 3D using COM. To duplicate this feat, download the Civil 3D Reminders Pack. Right click on a folder, maybe the Points perhaps? Then choose create new class. Give the class a classy name. Then paste the code below into the class, replacing all of the items. Change the class name to match the file name. Imports Autodesk.AutoCAD.DatabaseServicesImports Autodesk.AutoCAD.ApplicationServicesImports Autodesk.AutoCAD.RuntimeImports Autodesk.AECC.Interop.LandImports Autodesk.AECC.Interop.UiLandImports Autodesk.AutoCAD.InteropImports Autodesk.AutoCAD.GeometryImports Quux.C3DUtilitiesPublic Class PointCreation"CreatePointExample")> _ Public Sub HelloWorld() Dim oCivil As New AeccAppConnection Dim newPoint As AeccPoint Dim dLocation(0 To 2) As Double dLocation(0) = 0 dLocation(1) = 0 dLocation(2) = 0 newPoint = oCivil.AeccDoc.Points.Add(dLocation) End SubEnd Class.csharpcode, .csharpcode pre{ color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/}.csharpcode pre { margin: 0em; }.csharpcode .rem { color: #008000; }.csharpcode .kwrd { color: #0000ff; }.csharpcode .str { color: #006080; }.csharpcode .op { color: #0000c0; }.csharpcode .preproc { color: #cc6633; }.csharpcode .asp { background-color: #ffff00; }.csharpcode .html { color: #800000; }.csharpcode .attr { color: #ff0000; }.csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em;}.csharpcode .lnum { color: #606060; }If you don’t want to use the Civil 3D Reminders Pack make sure to download the Quux free edition and use a reference to it to get the AeccAppConnection to make it easier to get the Civil 3D document [more...]
Users' Comments
Please leave your comments about Point Creation COM Style.
blog comments powered by Disqus
 
Search
 
 
Pulse
 
Blog
 All product names are registered trademarks of their respective owners.Copyright © 2003-2013 Novedge LLC