AutoCAD Civil 3D General Discussion

Reply
Valued Contributor
XXL66
Posts: 88
Registered: ‎11-15-2004
Message 1 of 5 (74 Views)

C3D points

74 Views, 4 Replies
01-24-2005 09:57 AM
hi,

does someone have a simple VBA routine that shows how to convert a Acad point entity into a C3D point ?

thx !
*James Wedding
Message 2 of 5 (74 Views)

Re: C3D points

01-24-2005 10:54 AM in reply to: XXL66
Get the Northing, Easting, Elevation from the point, and use the Drawing.Points.Add method. -- James Wedding, P.E. Technology Manager & Associate Jones & Boyd, Inc. Dallas, TX XP/2 on P4-3.4/1G LDT2005SP1 & C3D2005SP1
*Peter Funk - Autodesk, Inc.
Message 3 of 5 (74 Views)

Re: C3D points

01-25-2005 06:36 AM in reply to: XXL66
Here is a simple program what will add a COGO point for every point object in the drawing file. The elevation of the COGO point will match the elevation of the AutoCAD point. Make sure that you add the refrences to the Civil type libraries before you run it. Cheers, Peter Funk Autodesk, Inc. Option Explicit Public g_oCivilApp As AeccApplication Public g_oAeccDoc As AeccDocument Public g_oAeccDb As AeccDatabase Function getCivilObjects() As Boolean Dim oApp As AcadApplication Set oApp = ThisDrawing.Application Const sAppName = "AeccXUiLand.AeccApplication" Set g_oCivilApp = oApp.GetInterfaceObject(sAppName) If g_oCivilApp Is Nothing Then MsgBox "Error creating " & sAppName & ", exit." getCivilObjects = False Exit Function End If Set g_oAeccDoc = g_oCivilApp.ActiveDocument Set g_oAeccDb = g_oAeccDoc.Database getCivilObjects = True End Function Public Sub convertPoints() getCivilObjects Dim cPoints As aeccpoints Dim point As AeccPoint Dim aPoint As AcadPoint Dim obj As AcadObject Dim coords As Variant Set cPoints = g_oAeccDb.Points For Each obj In ThisDrawing.ModelSpace If TypeOf obj Is AcadPoint Then Set aPoint = obj coords = aPoint.Coordinates cPoints.Add (coords) End If Next End Sub
Valued Contributor
XXL66
Posts: 88
Registered: ‎11-15-2004
Message 4 of 5 (74 Views)

Re: C3D points

01-25-2005 11:26 AM in reply to: XXL66
thx for the reply,

it did it using a slight different way.

I want to convert point which have EED attached, that EED has a number too (a unique string).

Can I use this name for number in a C3D point,
it seems it's read-only.

thx !
*James Wedding
Message 5 of 5 (74 Views)

Re: C3D points

01-25-2005 12:38 PM in reply to: XXL66
Grab the dvb file I've attached about five posts up. I think you'll have to write a text file with your EED number in a PNEZD (or some such) format, then import it back in. That sample file above does just that process. -- James Wedding, P.E. Technology Manager & Associate Jones & Boyd, Inc. Dallas, TX XP/2 on P4-3.4/1G LDT2005SP1 & C3D2005SP1

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community


Civil 3D Exchange Apps

Created by the community for the community, Autodesk Exchange Apps for AutoCAD Civil 3D helps you achieve greater speed, accuracy, and automation from concept to manufacturing.

Connect with Civil 3D

Twitter

Facebook

Blogs