Exemple #1
0
        /// <summary>
        /// Initializes a new instance of the <c>Block</c> class.
        /// </summary>
        /// <param name="name">Block name.</param>
        public Block(string name)
            : base(DxfObjectCode.Block)
        {
            if (string.IsNullOrEmpty(name))
                throw (new ArgumentNullException("name"));

            this.name = name;
            this.basePoint = Vector3f.Zero;
            this.layer = Layer.Default;
            this.attributes = new Dictionary<string, AttributeDefinition>();
            this.entities = new List<IEntityObject>();
            this.record=new BlockRecord(name);
            this.end = new BlockEnd(this.layer);
        }
Exemple #2
0
        /// <summary>
        /// Initializes a new instance of the <c>Block</c> class.
        /// </summary>
        /// <param name="name">Block name.</param>
        public Block(string name) : base(DxfObjectCode.Block)
        {
            if (string.IsNullOrEmpty(name))
            {
                throw (new ArgumentNullException("name"));
            }

            this.name       = name;
            this.basePoint  = Vector3f.Zero;
            this.layer      = Layer.Default;
            this.attributes = new Dictionary <string, AttributeDefinition>();
            this.entities   = new List <IEntityObject>();
            this.record     = new BlockRecord(name);
            this.end        = new BlockEnd(this.layer);
        }
Exemple #3
0
        public void WriteBlockEnd(BlockEnd blockEnd)
        {
            this.WriteCodePair(0, blockEnd.CodeName);
            this.WriteCodePair(5, blockEnd.Handle);
            this.WriteCodePair(100, SubclassMarker.Entity);
            this.WriteCodePair(8, blockEnd.Layer);

            this.WriteCodePair(100, SubclassMarker.BlockEnd);
        }