Can't see new SketchPlane

Can't see new SketchPlane

Anonymous
Not applicable
732 Views
1 Reply
Message 1 of 2

Can't see new SketchPlane

Anonymous
Not applicable

Hello everyone! Trying to create a new SketchPlane with this code

            using (Transaction tx = new Transaction(doc)) {
                tx.Start("Start");

                View activeView = uidoc.ActiveGraphicalView;

                SketchPlane sketch = activeView.SketchPlane;
                XYZ direction = activeView.ViewDirection;
                XYZ origin = activeView.Origin;
                Plane plane = Plane.CreateByNormalAndOrigin(activeView.ViewDirection, activeView.Origin);
                sketch = SketchPlane.Create(uidoc.Document, plane);
                activeView.ShowActiveWorkPlane();
                tx.Commit();
            
            }

But I don't see anything in one of projects in revit, but expect that I see something like this blue square on background. 

17000137_0-1602260779071.png


So what I do wrong that in one project I can see  new SketchPlane but in another can't?

Thank you!

 

0 Likes
733 Views
1 Reply
Reply (1)
Message 2 of 2

jeremytammik
Autodesk
Autodesk

Please explore your model in detail before and after creating your sketch plane using RevitLookup and other database exploration tools:

 

https://thebuildingcoder.typepad.com/blog/2017/01/virtues-of-reproduction-research-mep-settings-onto...

 

Then you will see more of what is going on.

 

You should also make a note of the newly created sketch plane's element id so that you can examine the new element in more detail.

  



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes