1. get all line on FIG.
The following js code, database tables take into line, then the line type of all objects traverse table, and obtain a linear output name
var Database = mxOcx.GetDatabase (); // return line database table object var linetypeTable = database.GetLinetypeTable (); // Create walker var ITER = linetypeTable.NewIterator (); IF (ITER == null ) return ; var SRET is = null ; // move the current traverse position for (;! iter.Done (); iter.Step ( to true , to false )) { // Returns the current position of the linear traversing pattern var lineType = iter.GetRecord (); // get the text style name SRET is SRET is = + ' , ' + lineType.Name; } alert (Sreten);
2. The subject line repair
Code below, allows the user to select an object on the map, then add a new line, and then a linear increase of the object into the new line.
var ENT = mxOcx.GetEntity ( " \ n-selection entity object: " ); IF (ENT == null ) { return; } mxOcx.AddLinetype("MyLineType", "6,-10"); // set the entity line. = ent.LineType " MyLineType " ; Alert ( " has been modified linear " ); mxOcx.UpdateDisplay();