{"id":309652,"date":"2020-09-08T21:00:19","date_gmt":"2020-09-08T21:00:19","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=309652"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=309652","title":{"rendered":"\u041f\u0440\u0438\u043c\u0435\u0440 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0443\u0442\u0438\u043b\u0438\u0442\u044b \u0434\u043b\u044f Unigraphics NX \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 NXOpen \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 Java"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/518330\/\">\u0420\u0435\u0448\u0438\u043b \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u043a\u043e\u043c\u0443 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u044b\u0435 \u0443\u0442\u0438\u043b\u0438\u0442\u044b \u0434\u043b\u044f Unigraphics NX \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 NXOpen \u0438 \u044f\u0437\u044b\u043a\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f Java.\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043c\u043e\u044f \u0443\u0442\u0438\u043b\u0438\u0442\u0430 \u0431\u0443\u0434\u0435\u0442 \u0441\u0442\u0440\u043e\u0438\u0442\u044c 2d \u0441\u0435\u0442\u043a\u0443 \u043d\u0430 \u0432\u0441\u0435 \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u044b\u0445 \u0442\u0435\u043b\u0430\u0445 \u0438 \u0433\u0440\u0430\u043d\u044f\u0445(\u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0434\u043b\u044f \u0437\u0430\u0434\u0430\u0447\u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438).<\/p>\n<p>  \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043f\u043e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 NXOpen \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043d\u0430 <a href=\"https:\/\/docs.plm.automation.siemens.com\/data_services\/resources\/nx\/10\/nx_api\/en_US\/custom\/open_java_ref\/index.html\" rel=\"nofollow\">\u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u043c \u0441\u0430\u0439\u0442\u0435<\/a>.<\/p>\n<p>  \u0412 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u043f\u0430\u043f\u043a\u0438 NX \u043b\u0435\u0436\u0430\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043d\u0430\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u0430 \u0442\u0430\u043a \u0436\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b:<\/p>\n<ul>\n<li>C:\\Program Files\\Siemens\\NX 12.0\\NXBIN \u0441 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435\u043c jar<\/li>\n<li>C:\\Program Files\\Siemens\\NX 12.0\\UGOPEN \u0441 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435\u043c jar <\/li>\n<li>C:\\Program Files\\Siemens\\NX 12.0\\UGOPEN\\SampleNXOpenApplications\\Java. <\/li>\n<\/ul>\n<p>  \u0414\u043b\u044f \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043a\u043e\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u0437\u0430 \u043e\u0441\u043d\u043e\u0432\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0436\u0443\u0440\u043d\u0430\u043b \u0437\u0430\u043f\u0438\u0441\u0438 \u0441\u0432\u043e\u0438\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u0432 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b.\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e Unigraphics NX \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 Visual Basic, \u043d\u043e \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u043d\u0430 Java \u0438\u043b\u0438 \u043d\u0430 \u043b\u044e\u0431\u043e\u0439 \u0434\u0440\u0443\u0433\u043e\u0439 \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/18\/pv\/it\/18pvitqjeek-olchrkz8lyyk2-8.png\"\/><\/p>\n<p>  \u0412\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0438\u0441\u0438 \u0436\u0443\u0440\u043d\u0430\u043b\u0430 \u0432 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u041b\u0438\u0441\u0442\u0438\u043d\u0433 \u043a\u043e\u0434\u0430<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">\/\/ NX 12.0.1.7 \/\/ Journal created by Aleksandr on Sun Nov  3 19:49:32 2019 RTZ 2 (\u0437\u0438\u043c\u0430)  \/\/ import nxopen.*; public class journalTT {   public static void main(String [] args) throws NXException, java.rmi.RemoteException   {     nxopen.Session theSession = (nxopen.Session)nxopen.SessionFactory.get(&quot;Session&quot;);     nxopen.cae.FemPart workFemPart = ((nxopen.cae.FemPart)theSession.parts().baseWork());     nxopen.cae.FemPart displayFemPart = ((nxopen.cae.FemPart)theSession.parts().baseDisplay());     \/\/ ----------------------------------------------     \/\/   \u041c\u0435\u043d\u044e: \u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c-&gt;\u0421\u0435\u0442\u043a\u0430-&gt;2D \u0441\u0435\u0442\u043a\u0430...     \/\/ ----------------------------------------------     int markId1;     markId1 = theSession.setUndoMark(nxopen.Session.MarkVisibility.VISIBLE, &quot;\u041d\u0430\u0447\u0430\u043b\u043e&quot;);          nxopen.cae.FEModel fEModel1 = ((nxopen.cae.FEModel)workFemPart.findObject(&quot;FEModel&quot;));     nxopen.cae.MeshManager meshManager1 = ((nxopen.cae.MeshManager)fEModel1.find(&quot;MeshManager&quot;));     nxopen.cae.Mesh2d nullNXOpen_CAE_Mesh2d = null;     nxopen.cae.Mesh2dBuilder mesh2dBuilder1;     mesh2dBuilder1 = meshManager1.createMesh2dBuilder(nullNXOpen_CAE_Mesh2d);          nxopen.cae.MeshCollector nullNXOpen_CAE_MeshCollector = null;     mesh2dBuilder1.elementType().destinationCollector().setElementContainer(nullNXOpen_CAE_MeshCollector);          mesh2dBuilder1.elementType().setElementTypeName(&quot;CQUAD4&quot;);          nxopen.Unit unit1 = ((nxopen.Unit)workFemPart.unitCollection().findObject(&quot;MilliMeter&quot;));     mesh2dBuilder1.propertyTable().setBaseScalarWithDataPropertyValue(&quot;quad mesh overall edge size&quot;, &quot;10&quot;, unit1);          mesh2dBuilder1.propertyTable().setBooleanPropertyValue(&quot;target minimum element edge length&quot;, false);          mesh2dBuilder1.propertyTable().setBaseScalarWithDataPropertyValue(&quot;surface curvature threshold&quot;, &quot;5.05&quot;, unit1);          nxopen.Unit nullNXOpen_Unit = null;     mesh2dBuilder1.propertyTable().setBaseScalarWithDataPropertyValue(&quot;small feature value&quot;, &quot;1&quot;, nullNXOpen_Unit);          theSession.setUndoMarkName(markId1, &quot;\u0414\u0438\u0430\u043b\u043e\u0433\u043e\u0432\u043e\u0435 \u043e\u043a\u043d\u043e 2D \u0441\u0435\u0442\u043a\u0430&quot;);          nxopen.DisplayableObject [] objects1  = new nxopen.DisplayableObject[1];     nxopen.cae.CAEBody cAEBody1 = ((nxopen.cae.CAEBody)workFemPart.findObject(&quot;CAE_Body(14)&quot;));     nxopen.cae.CAEFace cAEFace1 = ((nxopen.cae.CAEFace)cAEBody1.findObject(&quot;CAE_Face(14)&quot;));     objects1[0] = cAEFace1;     boolean added1;     added1 = mesh2dBuilder1.selectionList().add(objects1);          nxopen.DisplayableObject [] objects2  = new nxopen.DisplayableObject[1];     nxopen.cae.CAEBody cAEBody2 = ((nxopen.cae.CAEBody)workFemPart.findObject(&quot;CAE_Body(3)&quot;));     nxopen.cae.CAEFace cAEFace2 = ((nxopen.cae.CAEFace)cAEBody2.findObject(&quot;CAE_Face(3)&quot;));     objects2[0] = cAEFace2;     boolean added2;     added2 = mesh2dBuilder1.selectionList().add(objects2);          nxopen.DisplayableObject [] objects3  = new nxopen.DisplayableObject[1];     nxopen.cae.CAEBody cAEBody3 = ((nxopen.cae.CAEBody)workFemPart.findObject(&quot;CAE_Body(2)&quot;));     nxopen.cae.CAEFace cAEFace3 = ((nxopen.cae.CAEFace)cAEBody3.findObject(&quot;CAE_Face(2)&quot;));     objects3[0] = cAEFace3;     boolean added3;     added3 = mesh2dBuilder1.selectionList().add(objects3);          nxopen.DisplayableObject [] objects4  = new nxopen.DisplayableObject[1];     nxopen.cae.CAEBody cAEBody4 = ((nxopen.cae.CAEBody)workFemPart.findObject(&quot;CAE_Body(1)&quot;));     nxopen.cae.CAEFace cAEFace4 = ((nxopen.cae.CAEFace)cAEBody4.findObject(&quot;CAE_Face(1)&quot;));     objects4[0] = cAEFace4;     boolean added4;     added4 = mesh2dBuilder1.selectionList().add(objects4);          int markId2;     markId2 = theSession.setUndoMark(nxopen.Session.MarkVisibility.INVISIBLE, &quot;2D \u0441\u0435\u0442\u043a\u0430&quot;);          theSession.deleteUndoMark(markId2, null);          int markId3;     markId3 = theSession.setUndoMark(nxopen.Session.MarkVisibility.INVISIBLE, &quot;2D \u0441\u0435\u0442\u043a\u0430&quot;);          mesh2dBuilder1.setAutoResetOption(false);          mesh2dBuilder1.elementType().setElementDimension(nxopen.cae.ElementTypeBuilder.ElementType.SHELL);          mesh2dBuilder1.elementType().setElementTypeName(&quot;CQUAD4&quot;);          nxopen.cae.DestinationCollectorBuilder destinationCollectorBuilder1;     destinationCollectorBuilder1 = mesh2dBuilder1.elementType().destinationCollector();          destinationCollectorBuilder1.setElementContainer(nullNXOpen_CAE_MeshCollector);          destinationCollectorBuilder1.setAutomaticMode(true);          mesh2dBuilder1.propertyTable().setIntegerPropertyValue(&quot;meshing method&quot;, 0);          mesh2dBuilder1.propertyTable().setBaseScalarWithDataPropertyValue(&quot;quad mesh overall edge size&quot;, &quot;10&quot;, unit1);          mesh2dBuilder1.propertyTable().setBooleanPropertyValue(&quot;block decomposition option bool&quot;, false);          mesh2dBuilder1.propertyTable().setBooleanPropertyValue(&quot;mapped mesh option bool&quot;, false);          mesh2dBuilder1.propertyTable().setIntegerPropertyValue(&quot;fillet num elements&quot;, 3);          mesh2dBuilder1.propertyTable().setIntegerPropertyValue(&quot;num elements on cylinder circumference&quot;, 6);          mesh2dBuilder1.propertyTable().setBaseScalarWithDataPropertyValue(&quot;element size on cylinder height&quot;, &quot;1&quot;, unit1);          mesh2dBuilder1.propertyTable().setIntegerPropertyValue(&quot;quad only option&quot;, 0);          mesh2dBuilder1.propertyTable().setBooleanPropertyValue(&quot;mesh individual faces option bool&quot;, false);          mesh2dBuilder1.propertyTable().setIntegerPropertyValue(&quot;midnodes&quot;, 0);          mesh2dBuilder1.propertyTable().setBooleanPropertyValue(&quot;geometry tolerance option bool&quot;, false);          mesh2dBuilder1.propertyTable().setBaseScalarWithDataPropertyValue(&quot;geometry tolerance&quot;, &quot;0&quot;, unit1);          mesh2dBuilder1.propertyTable().setBooleanPropertyValue(&quot;target maximum element edge length bool&quot;, false);          mesh2dBuilder1.propertyTable().setBaseScalarWithDataPropertyValue(&quot;maximum element edge length&quot;, &quot;1&quot;, unit1);          mesh2dBuilder1.propertyTable().setBooleanPropertyValue(&quot;target minimum element edge length&quot;, false);          mesh2dBuilder1.propertyTable().setBooleanPropertyValue(&quot;split poor quads bool&quot;, false);          mesh2dBuilder1.propertyTable().setBooleanPropertyValue(&quot;move nodes off geometry bool&quot;, false);          mesh2dBuilder1.propertyTable().setBooleanPropertyValue(&quot;max quad warp option bool&quot;, false);          mesh2dBuilder1.propertyTable().setBaseScalarWithDataPropertyValue(&quot;max quad warp&quot;, &quot;5&quot;, nullNXOpen_Unit);          mesh2dBuilder1.propertyTable().setBaseScalarWithDataPropertyValue(&quot;max jacobian&quot;, &quot;5&quot;, nullNXOpen_Unit);          mesh2dBuilder1.propertyTable().setBooleanPropertyValue(&quot;target element skew bool&quot;, false);          mesh2dBuilder1.propertyTable().setBaseScalarWithDataPropertyValue(&quot;element skew&quot;, &quot;30&quot;, nullNXOpen_Unit);          mesh2dBuilder1.propertyTable().setBooleanPropertyValue(&quot;max included angle quad option bool&quot;, false);          nxopen.Unit unit2 = ((nxopen.Unit)workFemPart.unitCollection().findObject(&quot;Degrees&quot;));     mesh2dBuilder1.propertyTable().setBaseScalarWithDataPropertyValue(&quot;max included angle quad&quot;, &quot;150&quot;, unit2);          mesh2dBuilder1.propertyTable().setBooleanPropertyValue(&quot;min included angle quad option bool&quot;, false);          mesh2dBuilder1.propertyTable().setBaseScalarWithDataPropertyValue(&quot;min included angle quad&quot;, &quot;30&quot;, unit2);          mesh2dBuilder1.propertyTable().setBooleanPropertyValue(&quot;max included angle tria option bool&quot;, false);          mesh2dBuilder1.propertyTable().setBaseScalarWithDataPropertyValue(&quot;max included angle tria&quot;, &quot;150&quot;, unit2);          mesh2dBuilder1.propertyTable().setBooleanPropertyValue(&quot;min included angle tria option bool&quot;, false);          mesh2dBuilder1.propertyTable().setBaseScalarWithDataPropertyValue(&quot;min included angle tria&quot;, &quot;30&quot;, unit2);          mesh2dBuilder1.propertyTable().setBooleanPropertyValue(&quot;mesh transition bool&quot;, false);          mesh2dBuilder1.propertyTable().setBaseScalarWithDataPropertyValue(&quot;mesh size variation&quot;, &quot;50&quot;, nullNXOpen_Unit);          mesh2dBuilder1.propertyTable().setBaseScalarWithDataPropertyValue(&quot;surface curvature threshold&quot;, &quot;5.05&quot;, unit1);          mesh2dBuilder1.propertyTable().setBooleanPropertyValue(&quot;alternate feature abstraction bool&quot;, false);          mesh2dBuilder1.propertyTable().setBaseScalarWithDataPropertyValue(&quot;minimum feature element size&quot;, &quot;0.001&quot;, unit1);          mesh2dBuilder1.propertyTable().setBaseScalarWithDataPropertyValue(&quot;small feature tolerance&quot;, &quot;10&quot;, nullNXOpen_Unit);          mesh2dBuilder1.propertyTable().setBaseScalarWithDataPropertyValue(&quot;small feature value&quot;, &quot;1&quot;, nullNXOpen_Unit);          mesh2dBuilder1.propertyTable().setBooleanPropertyValue(&quot;suppress hole option bool&quot;, false);          mesh2dBuilder1.propertyTable().setBaseScalarWithDataPropertyValue(&quot;hole diameter tolerance&quot;, &quot;0&quot;, unit1);          mesh2dBuilder1.propertyTable().setIntegerPropertyValue(&quot;hole suppresion point type&quot;, 0);          mesh2dBuilder1.propertyTable().setBooleanPropertyValue(&quot;merge edge toggle bool&quot;, false);          mesh2dBuilder1.propertyTable().setBaseScalarWithDataPropertyValue(&quot;edge angle&quot;, &quot;15&quot;, unit2);          mesh2dBuilder1.propertyTable().setBooleanPropertyValue(&quot;quad mesh edge match toggle&quot;, false);          mesh2dBuilder1.propertyTable().setBaseScalarWithDataPropertyValue(&quot;quad mesh edge match tolerance&quot;, &quot;0.02&quot;, unit1);          mesh2dBuilder1.propertyTable().setBaseScalarWithDataPropertyValue(&quot;quad mesh smoothness tolerance&quot;, &quot;0.01&quot;, unit1);          mesh2dBuilder1.propertyTable().setBaseScalarWithDataPropertyValue(&quot;quad mesh surface match tolerance&quot;, &quot;0.001&quot;, unit1);          mesh2dBuilder1.propertyTable().setIntegerPropertyValue(&quot;quad mesh transitional rows&quot;, 3);          mesh2dBuilder1.propertyTable().setBaseScalarWithDataPropertyValue(&quot;min face angle&quot;, &quot;20&quot;, unit2);          mesh2dBuilder1.propertyTable().setIntegerPropertyValue(&quot;mesh time stamp&quot;, 0);          mesh2dBuilder1.propertyTable().setBaseScalarWithDataPropertyValue(&quot;quad mesh node coincidence tolerance&quot;, &quot;0.0001&quot;, unit1);          mesh2dBuilder1.propertyTable().setIntegerPropertyValue(&quot;mesh edit allowed&quot;, 0);          mesh2dBuilder1.propertyTable().setIntegerPropertyValue(&quot;transition edge seeding&quot;, 0);          mesh2dBuilder1.propertyTable().setIntegerPropertyValue(&quot;cylinder curved end num elements&quot;, 6);          int id1;     id1 = theSession.newestVisibleUndoMark();          int nErrs1;     nErrs1 = theSession.updateManager().doUpdate(id1);          nxopen.cae.Mesh [] meshes1 ;     meshes1 = mesh2dBuilder1.commitMesh();          theSession.deleteUndoMark(markId3, null);          theSession.setUndoMarkName(id1, &quot;2D \u0441\u0435\u0442\u043a\u0430&quot;);          mesh2dBuilder1.destroy();          \/\/ ----------------------------------------------     \/\/   \u041c\u0435\u043d\u044e: \u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b-&gt;\u041f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443-&gt;3 \u041e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0437\u0430\u043f\u0438\u0441\u0438 \u0436\u0443\u0440\u043d\u0430\u043b\u0430     \/\/ ----------------------------------------------     \/\/ ----------------------------------------------     \/\/   \u041c\u0435\u043d\u044e: \u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b-&gt;\u0416\u0443\u0440\u043d\u0430\u043b-&gt;\u041e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0437\u0430\u043f\u0438\u0441\u0438     \/\/ ----------------------------------------------      }      public static final int getUnloadOption() { return nxopen.BaseSession.LibraryUnloadOption.IMMEDIATELY; }    }     }<\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u0421\u0435\u0439\u0447\u0430\u0441 \u043e\u043d \u0441\u0442\u0440\u043e\u0438\u0442 \u0441\u0435\u0442\u043a\u0443 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0442\u0435\u0445 \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u044f\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u044b \u0432 \u043a\u043e\u0434\u0435, \u0430 \u0435\u0441\u043b\u0438 \u0438\u0445 \u043c\u0435\u043d\u044c\u0448\u0435 \u0438\u043b\u0438 \u0431\u043e\u043b\u044c\u0448\u0435 \u0431\u0443\u0434\u0435\u0442, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u0441\u044f \u0431\u0443\u0434\u0443\u0442 \u0438\u0445 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f, \u0442\u043e nx \u0432\u044b\u0434\u0430\u0441\u0442 \u043e\u0448\u0438\u0431\u043a\u0443 \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u0434\u0430. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043a\u043e\u0434 \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u0432 \u043d\u0435\u0433\u043e \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f try\/catch \u0438 \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u0442\u044c \u0441\u043f\u043e\u0441\u043e\u0431, \u0447\u0442\u043e\u0431\u044b \u043c\u044b \u043d\u0435 \u043f\u0440\u0438\u0432\u044f\u0437\u044b\u0432\u0430\u043b\u0438\u0441\u044c \u043a \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0443 \u043f\u043e\u043b\u0438\u0433\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0433\u0440\u0430\u043d\u0435\u0439.<\/p>\n<p>  \u042f \u0441\u0434\u0435\u043b\u0430\u043b \u044d\u0442\u043e \u0442\u0430\u043a:<\/p>\n<pre><code class=\"java\">        try {              for (int i = 1; i &lt; 20; i++) {                  obj=&quot;object&quot;+i;                 cAEB=&quot;cAEBody&quot;+i;                 cAEF=&quot;cAEFace&quot;+i;                 adde=&quot;added&quot;+i;                  \/\/Object objects = new Object();                 nxopen.DisplayableObject [] obj  = new nxopen.DisplayableObject[1];                 nxopen.cae.CAEBody cAEB = ((nxopen.cae.CAEBody)workFemPart.findObject((&quot;CAE_Body&quot;+&quot;(&quot;+i+&quot;)&quot;)));                 nxopen.cae.CAEFace cAEF = ((nxopen.cae.CAEFace)cAEB.findObject(&quot;CAE_Face&quot;+&quot;(&quot;+i+&quot;)&quot;));                 obj[0] = cAEF;                 boolean adde;                 adde = mesh2dBuilder1.selectionList().add(obj);             }         } catch (Exception ex) {<\/code><\/pre>\n<p>  \u0412\u043e\u0442 \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u043d\u044b\u0439 \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ap\/ey\/tm\/apeytms6pdrnpkoxzesytavbyw4.png\"\/><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/518330\/\"> https:\/\/habr.com\/ru\/post\/518330\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/518330\/\">\u0420\u0435\u0448\u0438\u043b \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u043a\u043e\u043c\u0443 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u044b\u0435 \u0443\u0442\u0438\u043b\u0438\u0442\u044b \u0434\u043b\u044f Unigraphics NX \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 NXOpen \u0438 \u044f\u0437\u044b\u043a\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f Java.\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043c\u043e\u044f \u0443\u0442\u0438\u043b\u0438\u0442\u0430 \u0431\u0443\u0434\u0435\u0442 \u0441\u0442\u0440\u043e\u0438\u0442\u044c 2d \u0441\u0435\u0442\u043a\u0443 \u043d\u0430 \u0432\u0441\u0435 \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u044b\u0445 \u0442\u0435\u043b\u0430\u0445 \u0438 \u0433\u0440\u0430\u043d\u044f\u0445(\u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0434\u043b\u044f \u0437\u0430\u0434\u0430\u0447\u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438).<\/p>\n<p>  \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043f\u043e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 NXOpen \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043d\u0430 <a href=\"https:\/\/docs.plm.automation.siemens.com\/data_services\/resources\/nx\/10\/nx_api\/en_US\/custom\/open_java_ref\/index.html\" rel=\"nofollow\">\u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u043c \u0441\u0430\u0439\u0442\u0435<\/a>.<\/p>\n<p>  \u0412 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u043f\u0430\u043f\u043a\u0438 NX \u043b\u0435\u0436\u0430\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043d\u0430\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u0430 \u0442\u0430\u043a \u0436\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b:<\/p>\n<ul>\n<li>C:\\Program Files\\Siemens\\NX 12.0\\NXBIN \u0441 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435\u043c jar<\/li>\n<li>C:\\Program Files\\Siemens\\NX 12.0\\UGOPEN \u0441 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435\u043c jar <\/li>\n<li>C:\\Program Files\\Siemens\\NX 12.0\\UGOPEN\\SampleNXOpenApplications\\Java. <\/li>\n<\/ul>\n<p>  \u0414\u043b\u044f \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043a\u043e\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u0437\u0430 \u043e\u0441\u043d\u043e\u0432\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0436\u0443\u0440\u043d\u0430\u043b \u0437\u0430\u043f\u0438\u0441\u0438 \u0441\u0432\u043e\u0438\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u0432 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b.\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e Unigraphics NX \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 Visual Basic, \u043d\u043e \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u043d\u0430 Java \u0438\u043b\u0438 \u043d\u0430 \u043b\u044e\u0431\u043e\u0439 \u0434\u0440\u0443\u0433\u043e\u0439 \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/18\/pv\/it\/18pvitqjeek-olchrkz8lyyk2-8.png\"\/><\/p>\n<p>  \u0412\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0438\u0441\u0438 \u0436\u0443\u0440\u043d\u0430\u043b\u0430 \u0432 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-309652","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/309652","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=309652"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/309652\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=309652"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=309652"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=309652"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}