Message 1 of 3
How to update extensible storage when I change the point cloud?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I want to modify the extensible storage when there are changes such as moving or rotating the point cloud.
It seems impossible in DocumentChangedEvent.
I found the Updater, but I can't get into the execute.
I've used both filters.
namespace TestPointCloud
{
class App : IExternalApplication
{
static string ExecutingAssemblyPath = System.Reflection.Assembly
.GetExecutingAssembly().Location;
AddInId addinId;
public Result OnStartup(UIControlledApplication a)
{
addinId = a.ActiveAddInId;
ControlledApplication ctrlApp = a.ControlledApplication;
ctrlApp.DocumentOpened += new EventHandler<DocumentOpenedEventArgs>(CtrlApp_DocumentOpened);
return Result.Succeeded;
}
private void CtrlApp_DocumentOpened(object sender, DocumentOpenedEventArgs e)
{
TextUpdater updater = new TextUpdater(addinId);
UpdaterRegistry.RegisterUpdater(updater);
//ElementCategoryFilter pointCloudFilter = new ElementCategoryFilter(BuiltInCategory.OST_PointClouds);
ElementClassFilter pointCloudFilter = new ElementClassFilter(typeof(PointCloudType));
UpdaterRegistry.AddTrigger(updater.GetUpdaterId(), pointCloudFilter, Element.GetChangeTypeGeometry());
}
public Result OnShutdown(UIControlledApplication a)
{
return Result.Succeeded;
}
}
public class TextUpdater: IUpdater
{
AddInId addinId;
UpdaterId updaterID;
public TextUpdater(AddInId id)
{
addinId = id;
updaterID = new UpdaterId(addinId, new Guid("FBF3F6B2-4C06-42d4-97C1-D1B4EB593EFF"));
}
public void Execute(UpdaterData data)
{
int test = 1;
}
public string GetAdditionalInformation() { return "N/A"; }
public ChangePriority GetChangePriority() { return ChangePriority.GridsLevelsReferencePlanes; }
public UpdaterId GetUpdaterId() { return updaterID; }
public string GetUpdaterName() { return "TestUpdater"; }
}
}