- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
all I want to do is get the point style from a user selected COGO point (& then later set it to a different one). This point might be selected along with lines, blocks, and/or whatever. I can get to where I'm dealing with the POINTENTITYobject but one can't access the style from that (or can we?). From what I gather I need to set am AECCPOINT variable from the pointentity object, using the pointentity number property as an index for the aeccpointS index method. THing is, I can't get the AECCPOINTS collection. with is a part of the civil database.
after much research I have the following relevent code:
Dim PtNumber As Double
Dim ePoint As PointEntity
Dim aPoint As AeccPoint
Dim aPoints As AeccPoints
Dim aPointsIds As ObjectIdCollection
Private m_oAeccDb As IAeccDatabase
<CommandMethod("CDE")> _
Public Sub ChangeToDemoCivil() 'this is the civil3d version, which works on COGO point styles too
ACF.SsGetStuff("Select objects to be placed onto DEMO layers:")
Dim idArray As ObjectId() = ACF.ssResult.GetObjectIds()
For Each id As ObjectId In idArray
Using acTrans As Transaction = ACF.Db.TransactionManager.StartTransaction()
Try
ePoint = CType(acTrans.GetObject(id, OpenMode.ForWrite), PointEntity)
If Not ePoint Is Nothing Then 'it is a cogo point, so change to appropriate demo style
PtNumber = ePoint.PointNumber
aPoints = m_oAeccDb.PointsACF.getstuff () is an external funtion that stores a list of objectids of selected objects in ACF.ssResult (as Autodesk.AutoCAD.EditorInput.SelectionSet)
I am getting a fatal error on this:
aPoints = m_oAeccDb.Points
Solved! Go to Solution.