本文整理汇总了C#中DxfAcadVersion类的典型用法代码示例。如果您正苦于以下问题:C# DxfAcadVersion类的具体用法?C# DxfAcadVersion怎么用?C# DxfAcadVersion使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
DxfAcadVersion类属于命名空间,在下文中一共展示了DxfAcadVersion类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AddValuePairs
protected override void AddValuePairs(List<DxfCodePair> pairs, DxfAcadVersion version, bool outputHandles)
{
base.AddValuePairs(pairs, version, outputHandles);
pairs.Add(new DxfCodePair(100, "AcDbFilter"));
pairs.Add(new DxfCodePair(100, "AcDbLayerFilter"));
pairs.AddRange(this.LayerNames.Select(p => new DxfCodePair(8, p)));
}
示例2: AddValuePairs
protected override void AddValuePairs(List<DxfCodePair> pairs, DxfAcadVersion version, bool outputHandles)
{
base.AddValuePairs(pairs, version, outputHandles);
pairs.Add(new DxfCodePair(100, "AcDbSortentsTable"));
pairs.AddRange(this.EntityHandles.Select(p => new DxfCodePair(331, UIntHandle(p))));
pairs.AddRange(this.SortHandles.Select(p => new DxfCodePair(5, UIntHandle(p))));
}
示例3: BlocksSectionFromBuffer
internal static DxfBlocksSection BlocksSectionFromBuffer(DxfCodePairBufferReader buffer, DxfAcadVersion version)
{
var section = new DxfBlocksSection();
while (buffer.ItemsRemain)
{
var pair = buffer.Peek();
if (DxfCodePair.IsSectionStart(pair))
{
// done reading blocks, onto the next section
break;
}
else if (DxfCodePair.IsSectionEnd(pair))
{
// done reading blocks
buffer.Advance(); // swallow (0, ENDSEC)
break;
}
if (pair.Code != 0)
{
throw new DxfReadException("Expected new block.", pair);
}
buffer.Advance(); // swallow (0, CLASS)
var block = DxfBlock.FromBuffer(buffer, version);
if (block != null)
{
section.Blocks.Add(block);
}
}
return section;
}
示例4: AddValuePairs
protected override void AddValuePairs(List<DxfCodePair> pairs, DxfAcadVersion version, bool outputHandles)
{
base.AddValuePairs(pairs, version, outputHandles);
pairs.Add(new DxfCodePair(100, "AcDbSortentsTable"));
pairs.AddRange(this.EntitiesPointers.Pointers.Select(p => new DxfCodePair(331, DxfCommonConverters.UIntHandle(p.Handle))));
pairs.AddRange(this.SortItemsPointers.Pointers.Select(p => new DxfCodePair(5, DxfCommonConverters.UIntHandle(p.Handle))));
}
示例5: AddValuePairs
protected override void AddValuePairs(List<DxfCodePair> pairs, DxfAcadVersion version, bool outputHandles)
{
base.AddValuePairs(pairs, version, outputHandles);
pairs.Add(new DxfCodePair(100, "AcDbUnderlayDefinition"));
pairs.Add(new DxfCodePair(1, (this.FileName)));
pairs.Add(new DxfCodePair(2, (this.Name)));
}
示例6: AddValuePairs
protected override void AddValuePairs(List<DxfCodePair> pairs, DxfAcadVersion version, bool outputHandles)
{
base.AddValuePairs(pairs, version, outputHandles);
pairs.Add(new DxfCodePair(100, "AcDbRasterVariables"));
pairs.Add(new DxfCodePair(90, (this.ClassVersion)));
pairs.Add(new DxfCodePair(70, BoolShort(this.DisplayImageFrame)));
}
示例7: GetValuePairs
public IEnumerable<DxfCodePair> GetValuePairs(DxfAcadVersion version, bool outputHandles)
{
var list = new List<DxfCodePair>();
list.Add(new DxfCodePair(0, EndBlockText));
if (outputHandles)
{
list.Add(new DxfCodePair(5, DxfCommonConverters.UIntHandle(Handle)));
}
if (Parent.XData != null)
{
Parent.XData.AddValuePairs(list, version, outputHandles);
}
if (version >= DxfAcadVersion.R14)
{
foreach (var group in ExtensionDataGroups)
{
group.AddValuePairs(list, version, outputHandles);
}
}
if (version >= DxfAcadVersion.R2000)
{
list.Add(new DxfCodePair(330, DxfCommonConverters.UIntHandle(0)));
}
if (version >= DxfAcadVersion.R13)
{
list.Add(new DxfCodePair(100, AcDbEntityText));
list.Add(new DxfCodePair(8, Parent.Layer));
list.Add(new DxfCodePair(100, AcDbBlockEndText));
}
return list;
}
示例8: AddValuePairs
protected override void AddValuePairs(List<DxfCodePair> pairs, DxfAcadVersion version, bool outputHandles)
{
base.AddValuePairs(pairs, version, outputHandles);
pairs.Add(new DxfCodePair(100, "AcDbIndex"));
pairs.Add(new DxfCodePair(40, DateDouble(this.Timestamp)));
pairs.Add(new DxfCodePair(100, "AcDbSpatialIndex"));
}
示例9: ClassesSectionFromBuffer
internal static DxfClassesSection ClassesSectionFromBuffer(DxfCodePairBufferReader buffer, DxfAcadVersion version)
{
var section = new DxfClassesSection();
while (buffer.ItemsRemain)
{
var pair = buffer.Peek();
if (DxfCodePair.IsSectionEnd(pair))
{
// done reading classes
buffer.Advance(); // swallow (0, ENDSEC)
break;
}
if (pair.Code != 0)
{
throw new DxfReadException("Expected new class.", pair);
}
var cls = DxfClass.FromBuffer(buffer, version);
if (cls != null)
{
section.Classes.Add(cls);
}
}
return section;
}
示例10: AddValuePairs
protected override void AddValuePairs(List<DxfCodePair> pairs, DxfAcadVersion version, bool outputHandles)
{
base.AddValuePairs(pairs, version, outputHandles);
pairs.Add(new DxfCodePair(100, "AcDbArc"));
pairs.Add(new DxfCodePair(50, (this.StartAngle)));
pairs.Add(new DxfCodePair(51, (this.EndAngle)));
}
示例11: AddValuePairs
protected override void AddValuePairs(List<DxfCodePair> pairs, DxfAcadVersion version, bool outputHandles)
{
base.AddValuePairs(pairs, version, outputHandles);
pairs.Add(new DxfCodePair(100, "AcDbXrecord"));
pairs.Add(new DxfCodePair(280, (short)(this.DuplicateRecordHandling)));
pairs.AddRange(DataPairs);
}
示例12: VersionToString
public static string VersionToString(DxfAcadVersion version)
{
switch (version)
{
case DxfAcadVersion.R10:
return R10;
case DxfAcadVersion.R11:
return R11;
case DxfAcadVersion.R12:
return R12;
case DxfAcadVersion.R13:
return R13;
case DxfAcadVersion.R14:
return R14;
case DxfAcadVersion.R2000:
return R2000;
case DxfAcadVersion.R2004:
return R2004;
case DxfAcadVersion.R2007:
return R2007;
case DxfAcadVersion.R2010:
return R2010;
case DxfAcadVersion.R2013:
return R2013;
default:
throw new NotSupportedException();
}
}
示例13: AddValuePairs
protected override void AddValuePairs(List<DxfCodePair> pairs, DxfAcadVersion version, bool outputHandles)
{
base.AddValuePairs(pairs, version, outputHandles);
pairs.Add(new DxfCodePair(100, "AcDbSectionManager"));
pairs.Add(new DxfCodePair(70, BoolShort(this.RequiresFullUpdate)));
pairs.Add(new DxfCodePair(90, SectionEntities.Count));
pairs.AddRange(this.SectionEntities.Select(p => new DxfCodePair(330, UIntHandle(p))));
}
示例14: AddValuePairs
protected override void AddValuePairs(List<DxfCodePair> pairs, DxfAcadVersion version, bool outputHandles)
{
base.AddValuePairs(pairs, version, outputHandles);
pairs.Add(new DxfCodePair(100, "AcDbModelerGeometry"));
pairs.Add(new DxfCodePair(70, (this.FormatVersionNumber)));
pairs.AddRange(this.CustomData.Select(p => new DxfCodePair(1, p)));
pairs.AddRange(this.CustomData2.Select(p => new DxfCodePair(3, p)));
}
示例15: AddValuePairs
protected override void AddValuePairs(List<DxfCodePair> pairs, DxfAcadVersion version, bool outputHandles)
{
base.AddValuePairs(pairs, version, outputHandles);
pairs.Add(new DxfCodePair(100, "AcDbRadialDiametricDimension"));
pairs.Add(new DxfCodePair(15, DefinitionPoint2?.X ?? default(double)));
pairs.Add(new DxfCodePair(25, DefinitionPoint2?.Y ?? default(double)));
pairs.Add(new DxfCodePair(35, DefinitionPoint2?.Z ?? default(double)));
pairs.Add(new DxfCodePair(40, (this.LeaderLength)));
}