Community
Civil 3D Forum
Welcome to Autodesk’s Civil 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Civil 3D topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

C3D points

4 REPLIES 4
Reply
Message 1 of 5
XXL66
161 Views, 4 Replies

C3D points

hi,

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

thx !
4 REPLIES 4
Message 2 of 5
Anonymous
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
Message 3 of 5
Anonymous
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
Message 4 of 5
XXL66
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 !
Message 5 of 5
Anonymous
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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


Autodesk Design & Make Report