private void doWriteAlignmentEntities(
            IAlignmentEntityEnumerationPolicy enumerationPolicy)
        {
            Document current = DocumentManager.ActiveDocument;

            using (Transaction tr = current.StartTransaction())
            {
                // First we select the alignment to write.
                //
                SingleObjectSelector <Alignment> selector =
                    new SingleObjectSelector <Alignment>();
                if (!selector.Select(current))
                {
                    write("\nNo Alignment was selected.");
                    return;
                }

                // We create the processor and assign the policy.
                //
                AlignmentEntityProcessor processor =
                    new AlignmentEntityProcessor(selector.SelectedId);
                processor.EnumerationPolicy = enumerationPolicy;

                // We create the writer and write the information to it.
                //
                DocumentOutputAlignmentEntityInfoWriter writer =
                    new DocumentOutputAlignmentEntityInfoWriter(current);
                processor.WriteInfo(writer);
            }
        }
Ejemplo n.º 2
0
        private ObjectId promptForSurface(Colibra.Document doc)
        {
            SingleObjectSelector <TinSurface> selector =
                new SingleObjectSelector <TinSurface>();

            selector.PromptMessage = "\nSelect TIN surface: ";
            selector.RejectMessage =
                "\nThe selected object is not a TIN surface.";
            selector.Select(doc);
            return(selector.SelectedId);
        }