1 Reply Latest reply on Apr 17, 2014 9:11 PM by Artem Taturevych

    Change RefPlane references

    Joecel Torres

      Dear All,


      How can I modify the First Reference and Second Reference of a RefPlane?

      I tried using RefPlaneFeatureData:: set_Reference but nothing happened.

      Not sure if I used the right function, I wasn`t able to find any topic about it on Forums and SW Help File.

      Anyway, here`s my code snippet...


      modelDoc.Extension.SelectByID2("PlaneTube", "PLANE", 0, 0, 0, false, 0, null, 0);

      SelectionMgr selMngr = (SelectionMgr)modelDoc.SelectionManager;

      Feature planeFeat = (Feature)selMngr.GetSelectedObject6(1, 0);

      RefPlaneFeatureData planeData = (RefPlaneFeatureData)planeFeat.GetDefinition();

      planeData.set_Reference(0, verticalLine); // --> verticalLine is a SketchLine casted as an object.


      Not sure if I`m doing the right thing here, please help!