No work plane set in current view excception occuring

No work plane set in current view excception occuring

praveen.cMXB2H
Enthusiast Enthusiast
212 Views
1 Reply
Message 1 of 2

No work plane set in current view excception occuring

praveen.cMXB2H
Enthusiast
Enthusiast

I am writing code for tag alignment in normal files i am able to call pick object method .

elboworigin = uiApp.ActiveUIDocument.Selection.PickPoint("Pick the Elbow");

 

but when i call this method on linked files error is coming like below 

praveencMXB2H_0-1689920403451.png

I tried some code samples to resolve this issue but no help.

 using (Transaction transaction = newTransaction(uiDoc.Document, "tt"))

      {

        transaction.Start();

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

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

        uiDoc.ActiveView.SketchPlane = sp;

        uiDoc.ActiveView.ShowActiveWorkPlane();

        transaction.Commit();

      }

I tried with this code error is resolved but all the tags are placing in same line horizontally but my selection is different.

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

NGM_AiYo
Advocate
Advocate

section view?  Check your view's UpDirection and RightDirection. Make sure you adjust the position within the view plane.

0 Likes