Author Topic: Sheet set placeview command  (Read 177 times)

0 Members and 1 Guest are viewing this topic.

Bryco

  • Water Moccasin
  • Posts: 1797
Sheet set placeview command
« on: March 08, 2017, 07:07:58 pm »
New to sheetsets so have some problems.
1) In begin command I make a nonplot layer active whick puts the viewport on that layer.
2) In end command I make the previous layer active again then
case "PLACEVIEW":
                    ObjectId brefId = Autodesk.AutoCAD.Internal.Utils.EntLast();
                    using (Transaction tr = db.TransactionManager.StartTransaction())
                    {
                        BlockReference br = tr.GetObject(brefId, OpenMode.ForWrite) as BlockReference;
                        if (br == null) return;

                        doc.Editor.WriteMessage(Environment.NewLine + br.Name);
                        if (br.Name != "Viewport Title Callout") return;                       
                        br.UpgradeOpen();
                        br.Layer = Layers.Layers.NAnnotation();
                        doc.Editor.WriteMessage(Environment.NewLine + br.Layer);                     
                        tr.Commit();
                    }
                    break
both the name and the layer print correctly but the blockref assumes the current layer (which is not the noplot layer)

the callouts addressed must the same way
case "CALLOUT":      behave themselves.

Anybody have a fix for this? Cheers in advance