cart: empty [ Login ]

How to display new adding entity

1 
Vincent
11/22/2022 8:15 AM
I couldn't get display update when new entity were adding. The code is shown as below. Thanks!
C# Code:
DxfCircle circle = new DxfCircle(new Point3D(10d, 3d, 1d), 10d); circle.Color = EntityColors.Green; model.Entities.Add(circle); gdiGraphics3D.EnableDrawablesUpdate(); gdiGraphics3D.UpdateDrawables(circle); gdiGraphics3D.BoundingBox(bounds, modelTransform); CalculateTo2DTransform(); Invalidate();
Wout
11/23/2022 1:55 PM
Hi, First of all, call method gdiGraphics3D.EnableDrawablesUpdate() right after the constructor, before the initial drawable creation. You can call method gdiGraphics3D.EAddDrawables(DxfModel model, IList<DxfEntity> modelSpaceEntities, Matrix4D modelTransform). This is for model space, I just noticed there is no overload yet for paper space though. - Wout
Vincent
11/24/2022 5:26 AM
It works, thanks!
1