CAD net Dimension Style

VC++实现DXF文件解析:从组码解析到图形绘制的完整工程指南 在计算机辅助设计(CAD)与工业软件集成领域,文件格式解析是连接设计与应用的关键技术。DXF(Drawing Exchange Format)作为AutoCAD等软件的标准交换格式,其本质是一种结构化的文本文件,通过组码(Group Code)与值对来定义图形实体、图层和块等元素。理解并实现DXF解析,意味着能将图纸中的几何数据(如直线、多段线的坐标)转换为程序可处理的结构,这对于开发CAD查看器、数据转换工具或集成到仿真分析系统具有重要价值。本文基于一个具体的VC++工程实践,深入剖析了如何通过模块化设计 阅读详情

 This chapter shows detailed example, how to manage of each option of "Modify Dimension Style" dialog box, on all its tabs:


/* DimStyleSample.cs
 * © Andrey Bushman, 2012 
 * The sample of dimsion style creating.
 */
using System;
 
using cad = Autodesk.AutoCAD.ApplicationServices
.Application;
using Ap = Autodesk.AutoCAD.ApplicationServices;
using Db = Autodesk.AutoCAD.DatabaseServices;
using Ed = Autodesk.AutoCAD.EditorInput;
using Rt = Autodesk.AutoCAD.Runtime;
using Clr = Autodesk.AutoCAD.Colors;
//************************************
 
[assembly: Rt.CommandClass(typeof(Bushman.CAD
  .Samples.Styles.DimStyleSample))]
 
namespace Bushman.CAD.Samples.Styles {
 
  public class DimStyleSample {
 
    [Rt.CommandMethod("CreateDimStyle",
      Rt.CommandFlags.Modal)]
    public void CreateDimStyle() {
      Ap.Document doc = cad.DocumentManager
        .MdiActiveDocument;
      Ed.Editor ed = doc.Editor;
      Db.Database db = doc.Database;
 
      using(Db.Transaction tr =
        db.TransactionManager.StartTransaction()) 
        {
 
        // Create new Text Style for using in the 
        // our new Dimension Styles
        Db.TextStyleTable tst =
          (Db.TextStyleTable)tr.GetObject(
          db.TextStyleTableId,
          Db.OpenMode.ForWrite);
        Db.TextStyleTableRecord textStyle =
          new Db.TextStyleTableRecord();
        textStyle.Name = "My TextStyle";
        textStyle.FileName = "MipGost.shx";
        tst.Add(textStyle);
        tr.AddNewlyCreatedDBObject(textStyle,
          true);
 
        // Create new Dimension Style...
        Db.DimStyleTable dst =
          (Db.DimStyleTable)tr.GetObject(
          db.DimStyleTableId,
          Db.OpenMode.ForWrite);
        Db.DimStyleTableRecord dimStyle =
          new Db.DimStyleTableRecord();
        dimStyle.Name = "My DimStyle";
 
        // Please, open the "Modify Dimension 
        // Style" dialog box (through _DIMSTYLE 
        // command, and press "Modify.." button)
        // - below I will modify these settings.
 
        // *** LINES tab ***
 
        // "Dimension lines" group:
 
        Db.ObjectId lineTypeId =
          db.ContinuousLinetype;
 
        dimStyle.Dimclrd = Clr.Color
          .FromColorIndex(Clr.ColorMethod.None,
          10); // Color
        // Linetype
        dimStyle.Dimltype = lineTypeId;
        dimStyle.Dimlwd = Db.LineWeight
          .LineWeight013; // Lineweight
        // Extend Beyond Ticks
        dimStyle.Dimdle = 1;
        dimStyle.Dimdli = 7; // Baseline Spacing
        // Suppress dim line 1
        dimStyle.Dimsd1 = false;
        // Suppress dim line 2
        dimStyle.Dimsd2 = false;
 
        // "Extension Lines" group:
        dimStyle.Dimclre = Clr.Color
          .FromColorIndex(Clr.ColorMethod.None,
          84); // Color
        // Linetype Ext 1
        dimStyle.Dimltex1 = lineTypeId;
        // Linetype Ext 2
        dimStyle.Dimltex2 = lineTypeId;
        dimStyle.Dimlwe = Db.LineWeight
          .LineWeight013; // Lineweight
        // Suppress Ext line 1
        dimStyle.Dimse1 = false;
        // Suppress Ext line 2
        dimStyle.Dimse2 = false;
        // Extend Beyond Dim Lines
        dimStyle.Dimexe = 2.5;
        // Offset From Origin
        dimStyle.Dimexo = 2.5;
        // Fixed Length Extension Lines
        dimStyle.DimfxlenOn = false;
        dimStyle.Dimfxlen = 1; // Length
 
        // *** SYMBOL AND ARROWS tab ***
 
        // "Arrowheads" group:
        // Note: Annotative blocks cannot be used
        // as custom arrowheads for dimensions or 
        // leaders.
        Db.BlockTable bt = (Db.BlockTable)tr
          .GetObject(db.BlockTableId,
          Db.OpenMode.ForRead);
 
        Db.ObjectId id1 = GetArrowObjectId_dim(
          "DIMBLK1", "_DOT");
        Db.ObjectId id2 = GetArrowObjectId_dim(
          "DIMBLK2", "_CLOSED");
        Db.ObjectId id3 = GetArrowObjectId_dim(
          "DIMBLK2", "_Oblique");
 
        // Make sure you set the "Dimsah" to 
        // true, if you need individually modify 
        // the 'Dimblk1', and 'Dimblk2'!
        // You can set Db.ObjectId.Null as value 
        // for default marker.
        dimStyle.Dimsah = true;
        // The "First" option on the "Symbols and
        // Arrows" tab
        dimStyle.Dimblk1 = id1;
        // The "Second" option on the "Symbols 
        // and Arrows" tab      
        dimStyle.Dimblk2 = id2;
 
        // Or as variant, you can to change the
        // both parameters simultaneously: 
        // the "First", and the "Second" through 
        // 'Dimblk', but then you must to comment
        // the code rows of setting values for 
        // 'Dimblk1', and 'Dimblk2'.
        // dimStyle.Dimblk = id3; 
 
        // Leader ('Closed filled' value)
        dimStyle.Dimldrblk = Db.ObjectId.Null;
        dimStyle.Dimasz = 3; // Arrow Size
 
        // "Center marks" group:
 
        // 'Dimcen' property's allowed values:
        //  0 - None; 
        //  1 - Mark; 
        // -1 - Line
        Int32 centerMarks = -1;
        Double centerMarksSize = 3.52;
        // The size of the center mark or 
        // centerline
        dimStyle.Dimcen = centerMarks *
          centerMarksSize;
 
        // The "Dimension Break" value is stored 
        // in XData of Dimension Style item...
        // Get the registered application names 
        // table
        Db.RegAppTable regTable =
          (Db.RegAppTable)tr.GetObject(
          db.RegAppTableId, Db.OpenMode.ForRead);
        String xName = "cad_DSTYLE_DIMBREAK";
        if(!regTable.Has(xName)) {
          regTable.UpgradeOpen();
 
          // Add the application names that would
          // be used to add Xdata
          Db.RegAppTableRecord app =
            new Db.RegAppTableRecord();
          app.Name = xName;
          regTable.Add(app);
          tr.AddNewlyCreatedDBObject(app, true);
        }
 
        Db.ResultBuffer rb = new Db.ResultBuffer(
            new Db.TypedValue((Int32)Db.DxfCode
              .ExtendedDataRegAppName, xName),
            new Db.TypedValue((Int32)Db.DxfCode
              .ExtendedDataInteger16, 391),
            new Db.TypedValue((Int32)Db.DxfCode
              .ExtendedDataReal, 19.7
          /* our value for "Dimension Break" 
           * property */));
 
        dimStyle.XData = rb;
 
        // The "Arc Length Symbol" group:
 
        // 'Dimarcsym' property's allowed values:
        // 0 - Places arc length symbols before 
        //    the dimension text
        // 1 - Places arc length symbols above 
        //    the dimension text
        // 2 - Suppresses the display of arc 
        //    length symbols
 
        // Arc Length Symbol
        dimStyle.Dimarcsym = 1;
 
        // The "Radius Jog Dimensions" group:
        dimStyle.Dimjogang = 90; // Jog Angle
 
        // "Linear Jog Dimensions" group:
        // The "Linear Jog Size" value is stored 
        // in XData of Dimension Style item...                
        xName = "cad_DSTYLE_DIMJAG";
        if(!regTable.Has(xName)) {
          regTable.UpgradeOpen();
 
          // Add the application names that would
          // be used to add Xdata
          Db.RegAppTableRecord app =
            new Db.RegAppTableRecord();
          app.Name = xName;
          regTable.Add(app);
          tr.AddNewlyCreatedDBObject(app, true);
        }
        rb = new Db.ResultBuffer(
            new Db.TypedValue((Int32)Db.DxfCode
              .ExtendedDataRegAppName, xName),
            new Db.TypedValue((Int32)Db.DxfCode
              .ExtendedDataInteger16, 388),
            new Db.TypedValue((Int32)Db.DxfCode
              .ExtendedDataReal, 5.56
          /* our value for "Linear Jog Size" 
           * property */));
        dimStyle.XData = rb;
 
        // *** TEXT tab ***
 
        // "Text Appearance" group: 
 
        // Text Style
        dimStyle.Dimtxsty = textStyle.ObjectId;
        dimStyle.Dimclrt = Clr.Color
          .FromColorIndex(Clr.ColorMethod.None,
          150); // Text Color
        // 'Dimtfill' property's allowed values:
        // 0 - No background
        // 1 - The background color of the 
        //    drawing
        // 2 - The background specified by 
        //    Dimtfillclr property
        dimStyle.Dimtfill = 2;
        dimStyle.Dimtfillclr = Clr.Color
          .FromColorIndex(Clr.ColorMethod.None,
          210); // Fill Color
        dimStyle.Dimtxt = 3.5; // Text Height
        // Fraction Height Scale
        dimStyle.Dimfrac = 2;
        // check/unchek the "Draw Frame Around 
        // Text"
        Boolean drawFrameAroundText = true;
        // parameter on the "Text" tab. Look 
        // 'Dimgap' below...
 
        // "Text Placement" group:
 
        // 'Dimtad' property's allowed values:
        // 0 - Centers the dimension text between
        //    the extension lines.
        // 1 - Places the dimension text above 
        //    the dimension line except when the 
        //    dimension line is not horizontal 
        //    and text inside the extension lines
        //    is forced horizontal (DIMTIH = 1). 
        //     The distance from the dimension 
        //    line to the baseline of the lowest 
        //    line of text is the current DIMGAP 
        //    value.
        // 2 - Places the dimension text on the 
        //    side of the dimension line farthest 
        //    away from the defining points.
        // 3 - Places the dimension text to 
        //    conform to Japanese Industrial 
        //    Standards (JIS).
        dimStyle.Dimtad = 1; // Vertical 
 
        // 'Dimjust' property's allowed values:
        // 0 - Positions the text above the 
        //    dimension line and center-justifies
        //    it between the extension lines
        // 1 - Positions the text next to the 
        //    first extension line
        // 2 - Positions the text next to the 
        //    second extension line
        // 3 - Positions the text above and 
        //    aligned with the first extension 
        //    line
        // 4 - Positions the text above and 
        //    aligned with the second extension 
        //    line
        dimStyle.Dimjust = 1; // Horizontal
        // Offset from Dim Line
        dimStyle.Dimgap = 7.777 *
          (drawFrameAroundText ? -1 : 1);
 
        // "Text Alignment" group:
 
        // Dimtih = true, Dimtoh = true - 
        //    Horizontal.
        // Dimtih = false, Dimtoh = true - 
        //    ISO Standard.
        // Dimtih = true, Dimtoh = false - 
        //    ISO Standard.
        // Dimtih = false, Dimtoh = false - 
        //    Aligned with Dimension Line                
 
        // 'Dimtih' property's allowed values:
        // false - Aligns text with the dimension 
        //    line
        // true - Draws text horizontally
        dimStyle.Dimtih = true; // Text Alignment
 
        // 'Dimtoh' property's allowed values:
        // false - Aligns text with the dimension
        //    line
        // true - Draws text horizontally
        dimStyle.Dimtoh = false;
 
        // *** FIT tab ***
 
        // "Fit Options" group:
 
        // 'Dimjust' property's allowed values:
        // 0 - Places both text and arrows 
        //    outside extension lines
        // 1 - Moves arrows first, then text
        // 2 - Moves text first, then arrows
        // 3 - Moves either text or arrows, 
        //    whichever fits best 
 
        // The 'Dimtix' property must be false
        dimStyle.Dimatfit = 1;
        // Always Keep Text Between Ext Lines
        dimStyle.Dimtix = false;
        // Suppress Arrows If They Don't Fit 
        // Inside Extension Lines
        dimStyle.Dimsoxd = true;
 
        // "Text placement" group:
        // 0 - Moves the dimension line with 
        //    dimension text
        // 1 - Adds a leader when dimension text 
        //    is moved
        // 2 - Allows text to be moved freely 
        //    without a leader 
        dimStyle.Dimtmove = 1;
 
        // "Scale for Dimension Features" group:
        dimStyle.Annotative =
          Db.AnnotativeStates.True; // Annotative                
        dimStyle.Dimscale = 1.23; // Dimscale
 
        // If you need to set "Scale Dimensions 
        // To Layout" than set .Dimscale = 0:
        // dimStyle.Dimscale = 0;
 
        // "Fine Tuning" group:
 
        // Place Text Manually
        dimStyle.Dimupt = true;
        // Draw Dim Line Between Ext Lines
        dimStyle.Dimtofl = true;
 
        // *** PRIMARY UNITS tab ***
 
        // 'Dimlunit' property's allowed values:
        // 1 - Scientific
        // 2 - Decimal
        // 3 - Engineering
        // 4 - Architectural (always displayed 
        //    stacked)
        // 5 - Fractional (always displayed 
        //    stacked)
        // 6 - Microsoft Windows Desktop (decimal 
        //    format using Control Panel 
        //     settings for decimal separator and
        //    number grouping symbols)
 
        // Linear Dimensions
        dimStyle.Dimlunit = 2;
        // The relative sizes of numbers in 
        // stacked fractions are based on the 
        // DIMTFAC system variable (in the same 
        // way that tolerance values use this 
        // system variable).
        dimStyle.Dimtfac = 1.0;
        dimStyle.Dimdec = 2; // Precision
 
        // 'Dimfrac' property's allowed values:
        // 0 - Horizontal stacking
        // 1 - Diagonal stacking
        // 2 - Not stacked (for example, 1/2)
        dimStyle.Dimfrac = 0; // Fraction Format
 
        // If dimension units is set to 
        // 'Decimal', the 'Dimdsep' property is 
        // used instead of the default decimal 
        // point. If 'Dimdsep' is set to NULL 
        // (default value, reset by entering a 
        // period), the decimal point is used as 
        // the dimension separator.
 
        // 'Dimdsep' property's allowed values:
        // '.' - Period
        // ',' - Comma
        // ' ' - Space
 
        // Decimal Separator
        dimStyle.Dimdsep = ',';
        dimStyle.Dimrnd = 2.5; // Round Off
 
        // Prefix, and Suffix
        // For example:
        // "www<>ddd"
        // www - prefix
        // <> - value
        // ddd - suffix
 
        // Without prefix and suffix
        dimStyle.Dimpost = "<>";
 
        // "Measurement Scale" group:
 
        dimStyle.Dimlfac = 2.5; // Scale Factor
        // Check/uncheck the "Apply to Layout 
        // Dimensions Only" option on the 
        // "Primary Units" tab:
        Boolean applyToLayoutDimensionsOnly =
          true;
        // negative value of 'Dimfrac' for 
        // checking
        dimStyle.Dimlfac =
          applyToLayoutDimensionsOnly ? -1 *
          Math.Abs(dimStyle.Dimlfac) :
            Math.Abs(dimStyle.Dimlfac);
 
        // "Zero Suppression" group:
 
        // 'Dimzin' property's allowed values:
        // 0 - Suppresses zero feet and precisely
        //    zero inches
        // 1 - Includes zero feet and precisely 
        //    zero inches
        // 2 - Includes zero feet and suppresses 
        //    zero inches
        // 3 - Includes zero inches and 
        //    suppresses zero feet
        // 4 - Suppresses leading zeros in 
        //    decimal dimensions (for example, 
        //    0.5000 becomes .5000)
        // 8 - Suppresses trailing zeros in 
        //    decimal dimensions (for example, 
        //    12.5000 becomes 12.5)
        // 12 - Suppresses both leading and 
        //    trailing zeros (for example, 0.5000
        //    becomes .5)                
        dimStyle.Dimzin = 0;
 
        // "Angular Dimensions" group:
 
        // 'Dimaunit' property's allowed values:
        // 0 - Decimal degrees
        // 1 - Degrees/minutes/seconds
        // 2 - Gradians
        // 3 - Radians
        dimStyle.Dimaunit = 0; // Units Format
 
        // 'Dimadec' property's allowed values:
        // -1 - Angular dimensions display the 
        //    number of decimal places specified 
        //    by 'Dimdec' property.
        // 0-8 - Specifies the number of decimal 
        //    places displayed in angular 
        //    dimensions 
        // (independent of 'Dimdec' property)
        dimStyle.Dimadec = 0; // Precision
 
        // "Zero Suppression" group:
 
        // 'Dimazin' property's allowed values:
        // 0 - Displays all leading and trailing 
        //    zeros
        // 1 - Suppresses leading zeros in 
        //    decimal dimensions (for example, 
        //    0.5000 becomes .5000)
        // 2 - Suppresses trailing zeros in 
        //    decimal dimensions (for example, 
        //    12.5000 becomes 12.5)
        // 3 - Suppresses leading and trailing 
        //    zeros (for example, 0.5000 becomes 
        //    .5) 
        dimStyle.Dimazin = 0;
 
        // *** ALTERNATIVE UNITS tab ***
 
        // Display Alternate Units
        dimStyle.Dimalt = true;
 
        // "Alternate Units" group:
 
        // 'Dimaltu' property's allowed values:
        // 1 - Scientific
        // 2 - Decimal
        // 3 - Engineering
        // 4 - Architectural (stacked)
        // 5 - Fractional (stacked)
        // 6 - Architectural
        // 7 - Fractional
        // 8 - Microsoft Windows Desktop (decimal
        //    format using Control Panel settings
        //    for decimal separator and number 
        //    grouping symbols)
        dimStyle.Dimaltu = 1; // Unit Format
        dimStyle.Dimaltd = 1; // Precision
        // Multiplier for Alternate Units
        dimStyle.Dimaltf = 1;
        // Round Distances To
        dimStyle.Dimaltrnd = 0;
 
        // Prefix, and Suffix
        // For example:
        // "www<>ddd"
        // www - prefix
        // <> - value
        // ddd - suffix
 
        // Without prefix and suffix
        dimStyle.Dimapost = "<>";
 
        // "Zero Suppression" group:
 
        // 'Dimaltz' property's allowed values:
        // 0 - Suppresses zero feet and precisely
        //    zero inches
        // 1 - Includes zero feet and precisely 
        //    zero inches
        // 2 - Includes zero feet and suppresses 
        //    zero inches
        // 3 - Includes zero inches and 
        //    suppresses zero feet
        // 4 - Suppresses leading zeros in 
        //    decimal dimensions (for example, 
        //    0.5000 becomes .5000)
        // 8 - Suppresses trailing zeros in 
        //    decimal dimensions (for example, 
        //    12.5000 becomes 12.5)
        // 12 - Suppresses both leading and 
        //    trailing zeros (for example, 
        //    0.5000 becomes .5)
        dimStyle.Dimaltz = 1; // Zero Suppression
 
        // "Placement" group:
        // I don't know how to set a necessary 
        //    value for "Placement" on "Alternate
        //    Units" tab.
 
        // *** TOLERANCES tab ***
 
        // "Tolerance Format" group:
 
        // Dimtol = true,  Dimlim = true  - 
        //    'Limits', but don't set this 
        //    combinations(!!!), or you will get 
        //    "Style Overrides" for Dimension 
        //    Style name. For getting the 
        //    'Limits' value, look below.
        // Dimtol = true,  Dimlim = false - 
        //    'Symmetrical'
        // Dimtol = false, Dimlim = true  - 
        //    'Limits'
        // Dimtol = false, Dimlim = false - 
        //    'None'
        // I don't know how to set values 
        // 'Basic', or 'Deviation' value for a 
        //  "Method" option in the "Tolerance 
        // Format" group, on the "Tolerances" tab
        dimStyle.Dimtol = false;
        dimStyle.Dimlim = true;
 
        dimStyle.Dimtdec = 1; // Precision
        dimStyle.Dimtp = 0; // Upper Value
        dimStyle.Dimtm = 0; // Lower Value
        // Scaling for Height
        dimStyle.Dimtfac = 1;
 
        // 'Dimtolj' property's allowed values:
        // 0 - Bottom
        // 1 - Middle
        // 2 - Top
 
        // Vertical Position
        dimStyle.Dimtolj = 0;
 
        // "Tolerance Alignment" group:
        // I don't know how to set an "Align 
        // Decimal Separators", or an "Align 
        // Operational Symbols" value for the 
        // "Align Decimal Separators" option in 
        // the "Tolerance Alignment" group on 
        // the "Tolerances" tab.
 
        // "Dimalttd" group:
 
        // 'Dimtolj' property's allowed values:
        // 0 - Suppresses zero feet and precisely
        //    zero inches
        // 1 - Includes zero feet and precisely 
        //    zero inches
        // 2 - Includes zero feet and suppresses 
        //    zero inches
        // 3 - Includes zero inches and 
        //    suppresses zero feet
        // 4 - Suppresses leading zeros in 
        //    decimal dimensions (for example, 
        //    0.5000 becomes .5000)
        // 8 - Suppresses trailing zeros in 
        //    decimal dimensions (for example, 
        //    12.5000 becomes 12.5)
        // 12 - Suppresses both leading and 
        //    trailing zeros (for example, 
        //    0.5000 becomes .5)
        dimStyle.Dimtzin = 1; // Zero Suppression
 
        // "Alternate Unit Tolerance" group:
 
        dimStyle.Dimalttd = 1; // Precision
 
        // "Zero Suppression" group:
 
        // 'Dimalttz' property's allowed values:
        // 0 - Suppresses zero feet and precisely
        //    zero inches
        // 1 - Includes zero feet and precisely 
        //    zero inches
        // 2 - Includes zero feet and suppresses 
        //    zero inches
        // 3 - Includes zero inches and 
        //    suppresses zero feet
        // 4 - Suppresses leading zeros
        // 8 - Suppresses trailing zeros
 
        // Zero Suppression
        dimStyle.Dimalttz = 1;
 
        // ***
        // save changes                
        dst.Add(dimStyle);
        tr.AddNewlyCreatedDBObject(dimStyle,
          true);
 
        // Solving a "Style Overrides" problem:
 
        // Set as current dimension style
        db.Dimstyle = dimStyle.ObjectId;
        db.SetDimstyleData(dimStyle);
 
        // Now create child dimensions, based on 
        // our dimension style. Read the 
        // ObjectARX Reference Guide > Additional
        // Information > Dimension Styles > 
        // Dimension Style Families
        String[] names = new String[] {
                      "$0", //  Linear child 
                      // style (both rotated and 
                      // aligned types)  
                      "$2", //  Angular child of 
                      // style (both 2-line and 
                      // 3-point types)  
                      "$3", //  Diameter child of
                      // style  
                      "$4", //  Radius child of 
                      // style  
                      "$6", //  Ordinate child of
                      // style  
                      "$7" //  Leader child of 
        // style (used for tolerance entities 
        //(DbFcf) also)  
                  };
        foreach(String item in names) {
          Db.DimStyleTableRecord childStyle;
          String childName = dimStyle.Name +
            item;
          if(dst.Has(childName)) {
            childStyle =
              (Db.DimStyleTableRecord)tr
              .GetObject(dst[childName],
              Db.OpenMode.ForWrite);
          }
          else {
            childStyle =
              (Db.DimStyleTableRecord)dimStyle
              .Clone();
            childStyle.Name = childName;
            dst.Add(childStyle);
            tr.AddNewlyCreatedDBObject(
              childStyle, true);
          }
        }
        tr.Commit();
      }
    }
 
    static Db.ObjectId GetArrowObjectId_dim(
      string arrow, string newArrName) {
      Db.ObjectId arrObjId = Db.ObjectId.Null;
      Ap.Document doc = cad.DocumentManager
        .MdiActiveDocument;
      Db.Database db = doc.Database;
 
      // Get the current value of DIMBLK1
      string oldArrName = cad.GetSystemVariable(
        arrow) as string;
 
      // Set DIMBLK to the new style
      // (this action may create a new block)
      cad.SetSystemVariable(arrow, newArrName);
 
      // Reset the previous value of DIMBLK
      if(oldArrName.Length != 0)
        cad.SetSystemVariable(arrow, oldArrName);
 
      // Now get the objectId of the block
      Db.Transaction tr = db.TransactionManager
        .StartTransaction();
      using(tr) {
        Db.BlockTable bt = (Db.BlockTable)tr
          .GetObject(db.BlockTableId, Db.OpenMode
          .ForRead);
        arrObjId = bt[newArrName];
        tr.Commit();
      }
      return arrObjId;
    }
  }
}

【信息科学与工程学】【物理/化学科学和工程技术】知识体系87——声学基础02 这个全面的声音信号参数表格涵盖了从基础声学到前沿计算声学的各个方面,包括传统声学参数、电声参数、心理声学参数、语音参数、音乐参数、环境声学参数、生物声学参数以及计算声学参数等。表格按照类别、参数名称、符号/单位、定义/描述、典型范围/值和影响因素/测量方法等维度进行组织,为声学系统的设计、分析、评估和优化提供了完整的参数参考体系。实际应用中应根据具体需求选择合适的参数子集进行评估和优化。这个空间声学参数表格涵盖了从基本声场参数到高级空间处理参数的各个方面,考虑了不同的参照点、听众角度、采集角度和多点采集的需 阅读详情

相关推荐

【信息科学与工程学】【数据科学】数据科学领域——第三篇 数学08 几何学00总篇

编号英文名称中文名称简要说明/归属1Foundations of Geometry几何基础公理化方法, Hilbert《几何基础》2Euclidean Geometry (Synthetic)欧几里得几何(综合法)《几何原本》传统3Analytic Geometry解析几何坐标方法, Descartes, Fermat4Plane Geometry平面几何三角形、圆、共点共线等经典问题5Solid Geometry立体几何三维空间中的图形与度量6Non-Euclidean Geometry非欧几何平行公设不

weixin_49199313的博客 197

Autodesk CAD帮助文档总结八 DXF ENTITIES

关于 DXF ENTITIES 段 适用于图形对象的图元组码。这些代码可以在 DXF™ 文件的 ENTITIES 区域中找到,并且由 AutoLISP®和 ObjectARX®应用程序在图元定义列表中使用。 相关参考 通用图元组码 (DXF) 3DFACE (DXF) 3DSOLID (DXF) ACAD_PROXY_ENTITY (DXF) ARC (DXF) ATTDE...

LGF 9506

【信息科学与工程学】【数据中心】第二十四篇 数据中心DaaS场景及算法

Flink, Kafka Streams, 时序数据库。Flink, Kafka Streams, 流处理引擎。Presto, ClickHouse, 查询加速引擎。Presto, ClickHouse, 查询加速引擎。延迟<50ms,可用性>99.99%,QPS>10K。REST API, GraphQL, API网关。Tableau, Power BI, 自助BI。Tableau, Power BI, 可视化库。Spark, Hadoop, 分布式计算框架。Spark, Hadoop, 分布式计算。

weixin_49199313的博客 1064

CAD .Net开发-标注样式去掉箭头

CAD二次开发C#标注样式去掉箭头 【思路】首先导入系统默认块,打开DIMSAH开关,设置DIMBLK1为“_NONE”。 [CommandMethod("LSRADIALDIMSTYLE")] public void LSRADIALDIMSTYLE() { Database db = HostApplicationServices.WorkingDatabase; using (Transactio

Lexis_007的博客 1382

NETDXF库实现的CAD自动绘图教程

netdxf是一个专门用于处理DXF(Drawing Exchange Format)文件的.NET开源库,它提供了简单而强大的API来创建、读取、修改DXF文件。DXF文件格式是AutoCAD广泛使用的标准文件格式之一,用于二维和三维矢量图形的交换。netdxf库的出现极大地简化了开发者处理DXF文件的复杂性,提高了工作效率。在netdxf中,多段线是通过Polyline类来表示的。一个Polyline对象可以由多个线段组成,并且每个线段可以有不同的属性,如线型、线宽和颜色。

weixin_35459464的博客 1592

SuperMap iDesktop 9D三维倾斜摄影数据处理

OSGB格式的三维倾斜摄影数据进入时空大数据平台之前需要进行数据优化和格式转换

weixin_43204897的博客 1131

标注样式:创建、修改和置为当前

原文:DIMSTYLES : Creating, Modifying and Setting Current OK.  This is not so much a cry for help as a post that might help someone else.   I was trying to find concise code that would let me create a

CCの技术宅 4979

保姆级教程:将YOLOv8模型封装成Docker镜像,集成到CVAT实现自动标注

本文提供了一份详细的保姆级教程,指导如何将YOLOv8模型封装成Docker镜像并集成到CVAT平台,实现自动化标注。通过环境配置、模型服务化封装、Docker镜像构建与优化、CVAT平台集成等步骤,帮助开发者高效完成计算机视觉项目的自动标注工作流,显著提升标注效率。

weixin_28692817的博客 414

转自AutoCAD .NET 开发人员手册——Dimension各参数含义

Each dimension has the capability of overriding the settings assigned to it by a dimension style. The following properties are available for most dimension objects: Dimatfit Specifies the disp

CCの技术宅 6660

汽车IVI中控开发入门及进阶(九):显示屏

显示屏Display panel和触控屏Touch panel,可以说随着汽车四化的进展,屏越来越多,越来越大,越来越高清,成为IVI中控、智能座舱系统的重要组成部分。比如如下一个电阻触摸屏。正文:显示屏主要功能就是显示,车载内容和信息的传递全靠显示屏,目前车载显示屏的种类可以分为:LCD液晶显示屏(TFT(薄膜晶体管)驱动的有源矩阵液晶显示,再细分IPS、TFT、SLCD,这几个子类)、LED显示屏(用 LED发光二极管作为背光光源)、OLED 显示屏。

码农17年的博客 2526

企业数字化建设之——品牌零售全渠道运营中台解决方案

OMS审单 --> 订单进入OMS待发货列表区域 --> 备货(线下)-->拣货((线下 )-->质检(线下)--> 包装(线下)--> 快递员取货(线下)(物品 + 客户收货地址清单 )--> 快递员发货(2.2.5 正常退货,客户发起 --> 客服助理审核 --> 评审组 --> ( 货物运输 ) -->质检 ->仓库收货入 正常仓库 -->财务退款,记账。OMS审单 --> 订单进入物流公司系统(如:*丰),--> 快递员发货 --> 物流状态同步OMS --> OMS同步物流状态到销售平台。

java_zhong1990的专栏 612

lisp 标记形心_DXF组码来生成标注样式(标注文字样式、标注箭头样式)

本文介绍AutoLisp用DXF组码来生成标注样式(标注文字样式、标注箭头样式)方法。一、先生成标注文本样式(若已存在则忽略此步)说明:用DXF组码生成标注样式中的标注文字样式时,其DXF参考中组码:340,说明:DIMTXSTY(参照的 STYLE 的句柄),DIMTXSTY系统变量:指定标注的文字样式。实际AutoLisp用DXF组码来生成标注样式中的标注文字样式时应是使用文字样式对象的图元名...

weixin_39963523的博客 1252

Xilinx高级调试方法--远程调试

本文主要介绍Xilinx的一些高级调试方法,以及如何使用Xilinx的相关IP。

斌赋的博客 3308

AutoCAD.net: DXF群码

图形常用DXF群码 共享DXF群码 -1 = 像素名称 (Entity Name) 0 = 像素类型 (Entity Type) ...

weixin_30578677的博客 213

【Python计量】linearmodels面板数据回归(一)

我们以伍德里奇《计量经济学导论现代方法》的”第14章高级面板数据方法“的案例14.1为例,使用jtrain中的数据来进行固定效应估计。

mfsdmlove的博客 9277

[AI] 企业内网部署大模型的三种常见方案:从“能用”到“好用”的技术选型指南

企业内网部署大模型的三种方案解析:本地模型安全但门槛高,平台方案(如Dify)最平衡推荐,混合架构适合进阶需求。关键路径是渐进式演进,从快速验证到平台化建设,核心在于流程优化而非单纯选模型。数据安全、成本可控和工程落地能力是决策重点。

技术小甜甜:传播可落地技术,帮助个人和企业降低解决真实场景问题的成本 770

Creo工程配置实战:单位、比例、文件管理与批量转换全攻略

在三维CAD软件的日常使用中,除了建模命令,工程配置与文件管理是决定效率的关键环节。以Creo为例,许多用户常在单位制切换、工程图导出CAD比例、旧版本文件清理等基础操作上耗费大量时间。理解config.pro配置文件的加载机制、掌握单位模板的毫米设置方法,是构建规范工作环境的第一步。同时,合理运用purge命令清除历史版本、通过备份功能安全移动装配体、利用脚本或接口实现批量转STL,都能显著提升数据管理的可靠性。这些工程实践不仅解决实际痛点,也为后续学习Creo二次开发打下基础。本文梳理高频搜索词背后的真

weixin_33889245的博客 290

【车载以太网】【SOMEIP】Wireshark测试someip

一、 Wireshark SOMEIP plugin 1.1 插件安装 Wireshark插件目录:Help -> About Wireshark -> Folders/Pluginshttps://github.com/jamores/eth-ws-someip 解压后,将所有后缀是lua的文件拷贝到Wireshark安装目录plugins/2.4.10/下。 1.2时间戳调整为UTC显示格式 View -> Time Display Format -> Date and Tim.

专注汽车软件开发、AutoSAR、车载以太网、SOA、EE架构。 9725

标注尺寸自定义全攻略:从参数设置到样式库管理

在工程制图、UI设计和数据可视化领域,标注是传达精确尺寸与信息的关键环节。其核心原理在于通过定义一套视觉规则(如尺寸线、箭头、文字样式)来清晰、一致地表达测量数据。这项技术的价值在于能显著提升图纸的专业性、可读性及团队协作效率,避免因默认样式不统一导致的重复调整。在实际应用中,无论是机械CAD绘图、建筑图纸还是编程图表生成,自定义标注都能适应不同行业标准和输出媒介的需求。本文聚焦于标注尺寸自定义的完整工作流,深入解析了包括尺寸线、箭头、文字、精度及全局比例在内的核心参数设置逻辑,并提供了创建可复用样式库以及

406

STM32F407中文手册

STM32f407中文手册 本参考手册面向应用开发人员,提供有关使用 STM32F405xx/07xx、STM32F415xx/17xx、 STM32F42xxx 和 STM32F43xxx 微控制器存储器与外设的完整信息。STM32F405xx/07xx、STM32F415xx/17xx、STM32F42xxx 和 STM32F43xxx 构成一个微 控制器系列,各产品具有不同的存储器大小、封装和外设。有关订购信息以及器件的机械与电气特性,请参见数据手册。有关 ARM Cortex™-M4F 内核的信息,请参见《Cortex™-M4F 技术参考手册》。

Outlook Express 6 (OE6) for Win7/Win8/Win10

英文版 Outlook Express6.0, 兼容Win7/Win10/WinXP,解压就可用。

CAD 系统变量参数大全

CAD 系统变量参数大全 一、数学运算功能函数 1.1(十 数值 数值…)返回:累计实数或整数数值 1.2(一 数值 数值…)返回:差值 1.3(* 数值 数值…)返回:所有数值乘积 1.4(/ 数值 数值…)返回:第一个数值除以第二个以后数值的商 1.5(l十 数值)返回:数值十l 6(1— 数值)返回:数值一l 1.7(abs 数值)返回:数值的绝对值 1.8(atan 数值)返回:...

Cronus Z的博客 6732

锂电池充电器电路设计 里面有电路

锂电池充电器电路设计 里面有电路 3.7V升压到5V电路设计。

基于ezdxf,参数化DXF图像信息,在终端修改图像参数及标注

获取标注的text和值。

Chain 2124

C# WinForm 基于DirectShow.dll编写的程序,可边预览边保存视频,音频和图片

基于微软的DirectShow.dll的二次开发1.自动识别连接的摄像头跟麦克风且可以对其进行选择(默认选中第一个)2.可录制wmv和avi两种格式的视频并且都带有音频,avi可以录制的分辨率和帧数进行选择,wmv默认进行了淸晰度优化如不喜欢可去除代码中有相关提示3.可在预览点开之后进行拍照,也可边录制视频边拍照4.添加了视频和音频的压缩功能(酌情使用)这次二次开发发现C#对DirectShow的相关信息太少,这次做完也不敢藏私共享出来,还望大家指正

用.NET创建并且覆盖AutoCAD的标注样式

原文:Creating and overriding AutoCAD dimension styles using .NET 上周末有一封电子邮件发来了一份请求:: 我一直在寻找一种创建标注样式重定义的方法,但一直没有真的没有成功。我写了一个程序,在程序中我创建了几个标注样式,但是总是会丢失标注的重定义。 这似乎是一个很好的重定义话题,所以这篇文章包含一些简单的代码,创建一个样式和两个几

CCの技术宅 3754

CAD关于标注样式修改标注对象的标注样式(com接口网页版)

标注对象都一个DimensionStyle属性,用这个属性可以设置或取到标注对象的标注样式。 下面代码演示设置一个标注对象的样式 var ent = mxOcx.GetEntity("选择标注对象:"); if(ent == null) { return; } var dim = ent; // 得到数据库对象. va...

u013725001的专栏 395

创建新的标注样式并设为当前标注样式

原文:Creating a new dimension style and make it as current [CommandMethod("NewDimStyle")] public void NewDimStyle() { Database db = Application.DocumentManager.MdiActiveDocument.Databas

CCの技术宅 3103

【AI+CAD】(一)ezdxf 解析DXF文件

【AI+CAD】(一)ezdxf 解析DXF文件

ZhengrongYue的博客 9580

Python实现读取dxf文件的所有字符

Python实现读取dxf文件的所有字符

corn1949的博客 1512
上一篇: RabbitMq C#(一) HelloWorld(本机)
下一篇: cad 自定义快捷键
TimeFuture2017
博客等级 码龄10年 115粉丝 175原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值