Quantcast
Channel: All Revit API Forum posts
Viewing all articles
Browse latest Browse all 67020

Unable to set active work plane

$
0
0

Hi everyone,

 

I want to activate a work plane but I got error message "Model lines can not be drawn in current view", please help me to verify the below method to activate a work plane

 

 

 

        public static void SetActiveWorkPlane(UIDocument uiDoc)
        {
            Transaction transaction = new Transaction(uiDoc.Document, "WorkPlane");
            transaction.Start();

            Plane plane = Plane.CreateByNormalAndOrigin(uiDoc.Document.ActiveView.ViewDirection,
                                    uiDoc.Document.ActiveView.Origin);

            SketchPlane sp = SketchPlane.Create(uiDoc.Document, plane);

            uiDoc.Document.ActiveView.SketchPlane = sp;
            uiDoc.Document.ActiveView.ShowActiveWorkPlane();

            transaction.Commit();
        }

 

 

Thanks & Regards,

Cuong


Viewing all articles
Browse latest Browse all 67020

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>