Message 1 of 5
PointGroup.Add
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
When creating a point group on the first run its not using the passed name, but "newNameBase". On the next run it appears to work correctly. Anyone have a fix for this? Checking the name and setting it the desired name doesn't appear to work.
public static ObjectId GetPointGroupObjId(this CivilDocument civDoc, string name, List<string> existingPtGroupNames)
{
if (civDoc.PointGroups.Contains(name))
{
return civDoc.PointGroups[name];
}
var newName = name.CheckNameAndIncrement(existingPtGroupNames);
var ptGroupObjId = civDoc.PointGroups.Add(newName);
var ptGroup = ptGroupObjId.GetObject(OpenMode.ForRead) as PointGroup;
if (ptGroup.Name != newName)
{
ptGroup.UpgradeOpen();
ptGroup.Name = newName;
}
return ptGroupObjId;
}
Civil Reminders
http://blog.civil3dreminders.com/
http://www.CivilReminders.com/
Alumni
http://blog.civil3dreminders.com/
http://www.CivilReminders.com/
Alumni