- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I had a previous post here to access Civil 3d objects. Thanks to @Alexander.Rivilis and @zrobert I successfully created the application and was able to manipulate those by accessing properties of relevant objects through com. Taking it to the next step, I got a request to pick an object in the editor and then manipulate its properties. I just cant seem to successfully get the relationship between the picked entity and casting/converting it to the necessary object to manipulate it. I looked at this post and tried to implement something similar.
AcDbObjectId id; acdbGetObjectId(id, en);
AcDbObjectPointer<IAeccSurfacePtr> pEnt(id, AcDb::kForWrite); // is this correct for accessing a surface?
if (pEnt.openStatus() == Acad::eOk)
{
//manipulate pEnt properties
}
of course it fails.
Can someone please provide any helpful info on how to cast to the right entity. Any helpful links? I have googled over several days and cannot find anything. I just need to be able to manipulate the picked civil 3d entity which is a surface. Thanks for all your help in advance.
p.s. I also posted this in the Civil3D customization forums here
Solved! Go to Solution.