CAD add dimension style dimension style on operations (com Interface Web version)

The following codes, denoted stylesheet obtained, and then add a record to the table landmark table.

Js code to achieve the following:

  function CreateDim () {
     // Returns the control database object 
    var Database = mxOcx.GetDatabase ();
     // returns the style sheet label objects in the database 
    var mxdim = database.GetDimStyleTable ();
     // add a new dimension style 
    var dimstr = mxdim.Add ( "mydim" );
     // set the style 
    dimstr.SetDimVarDouble (40, 20.0 );
     // returns the style sheet label objects in the database 
    database.CurrentlyDimstyleName = "mydim" ; 
  
}

AddDimStyle may also be used for increasing a dimension style, in detail with reference to:

http://www.mxdraw.com/help/MxDrawXLib___DMxDrawX__AddDimStyle@BSTR@BSTR@BSTR@[email protected]

such as:

 MxDrawX1.AddDimStyle "MyDimStyle2", "41,0.18,141,0.09,40,200", "77,1,271,3", "", ""
   
 MxDrawX1.DimStyle = "MyDimStyle2"

 

Guess you like

Origin www.cnblogs.com/yzy0224/p/12010110.html