{"id":204098,"date":"2013-11-28T23:29:03","date_gmt":"2013-11-28T19:29:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=204098"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=204098","title":{"rendered":"<span class=\"post_title\">\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e\u0433\u043e API \u2013 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0433\u043e \u043f\u0430\u043a\u0435\u0442\u0430 SolidWorks. \u041c\u043e\u0434\u0435\u043b\u044c \u0431\u043e\u043b\u0442\u0430<\/span>"},"content":{"rendered":"<div class=\"content html_format\">\n<h4>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h4>\n<p>  \u0412 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0435 \u0431\u044b\u043b\u0438 \u0438\u0437\u043b\u043e\u0436\u0435\u043d\u044b \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 API \u2013 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0442\u0440\u0435\u0445\u043c\u0435\u0440\u043d\u043e\u0433\u043e \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f SolidWorks. \u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e API \u2013 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u0434\u043b\u044f \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u044f \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u0430 \u2013 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430.<br \/>  \u041e\u0434\u043d\u0438\u043c \u0438\u0437 \u044d\u0442\u0430\u043f\u043e\u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0442\u0440\u0435\u0445\u043c\u0435\u0440\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u0438\u0437\u0434\u0435\u043b\u0438\u044f. \u0412 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u0443\u0437\u043b\u0430\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u044b\u0445 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0441\u0430\u043c\u0438\u043c \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u043e\u043c \u043a\u0440\u0435\u043f\u0435\u0436\u043d\u044b\u0445 \u0438\u0437\u0434\u0435\u043b\u0438\u0439.<br \/>  \u0420\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0439 \u0432 SolidWorks, \u043e\u0434\u043d\u0430\u043a\u043e \u0435\u0441\u043b\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043a\u0440\u0435\u043f\u0435\u0436\u043d\u044b\u0435 \u0438\u0437\u0434\u0435\u043b\u0438\u044f, \u0442\u043e \u0438\u043d\u0436\u0435\u043d\u0435\u0440 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0437\u043d\u0430\u0442\u044c \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043a\u0430\u043a\u0438\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u044b \u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0435\u043c\u0443 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f. \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438 \u0441\u0431\u043e\u0440\u043a\u0438 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u0434\u0435\u0442\u0430\u043b\u0435\u0439 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c\u044e \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u0440\u0435\u043f\u0435\u0436\u043d\u044b\u0445 \u0438\u0437\u0434\u0435\u043b\u0438\u0439.<br \/>  \u0412 \u0440\u0430\u043c\u043a\u0430\u0445 \u044d\u0442\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043e API \u2013 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438 \u0431\u043e\u043b\u0442\u0430, \u0441 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438.<a name=\"habracut\"><\/a>  <\/p>\n<h4>\u0426\u0435\u043b\u0438 \u0438 \u0437\u0430\u0434\u0430\u0447\u0438<\/h4>\n<p>   \u0426\u0435\u043b\u044c\u044e \u0434\u0430\u043d\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438 \u0442\u0440\u0443\u0434\u0430 \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u0430 \u2013 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u0438\u0440\u0443\u0435\u043c\u043e\u0433\u043e \u0438\u0437\u0434\u0435\u043b\u0438\u044f. \u0412 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0439 \u0446\u0435\u043b\u0438 \u0431\u044b\u043b\u0438 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u044b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438:<br \/>  \u2022 \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0442\u0438\u043f\u043e\u0432\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u0431\u043e\u043b\u0442\u0430;<br \/>  \u2022 \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 API \u2013 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f;<br \/>  \u2022 \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0449\u0435\u0439 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438;  <\/p>\n<h4>\u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438<\/h4>\n<p>  \u2022 SolidWorks;<br \/>  \u2022 C#;<br \/>  \u2022 WPF;<br \/>  \u2022 VSTA (Visual Studio Tools for Applications);  <\/p>\n<h4>\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043c\u043e\u0434\u0435\u043b\u0438<\/h4>\n<p>  \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u044b\u043b\u0430 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0430 \u0442\u0440\u0435\u0445\u043c\u0435\u0440\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u0430\u044f \u043d\u0430 \u0440\u0438\u0441\u0443\u043d\u043a\u0435 \u043d\u0438\u0436\u0435. <br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/6fb\/5ae\/68e\/6fb5ae68ed56af8b171621ddac6b0b4e.png\"\/>  <\/p>\n<h4>\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430<\/h4>\n<p>   \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0431\u044b\u043b\u0430 \u0432\u044b\u0431\u0440\u0430\u043d\u0430 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044f Windows Presentation Foundation. XAML \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0430 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0430 \u0432 \u043b\u0438\u0441\u0442\u0438\u043d\u0433\u0435.  <\/p>\n<pre><code class=\"xml\">&lt;Window x:Class=&quot;APIHabr.MainWindow&quot;         xmlns=&quot;http:\/\/schemas.microsoft.com\/winfx\/2006\/xaml\/presentation&quot;         xmlns:x=&quot;http:\/\/schemas.microsoft.com\/winfx\/2006\/xaml&quot;         Title=&quot;API-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435&quot; Height=&quot;250&quot; Width=&quot;375&quot;&gt;     &lt;Grid&gt;         &lt;Grid.RowDefinitions&gt;             &lt;RowDefinition Height=&quot;auto&quot;&gt;&lt;\/RowDefinition&gt;             &lt;RowDefinition Height=&quot;auto&quot;&gt;&lt;\/RowDefinition&gt;             &lt;RowDefinition Height=&quot;auto&quot;&gt;&lt;\/RowDefinition&gt;             &lt;RowDefinition Height=&quot;auto&quot;&gt;&lt;\/RowDefinition&gt;             &lt;RowDefinition Height=&quot;auto&quot;&gt;&lt;\/RowDefinition&gt;             &lt;RowDefinition Height=&quot;auto&quot;&gt;&lt;\/RowDefinition&gt;         &lt;\/Grid.RowDefinitions&gt;                 &lt;Grid.ColumnDefinitions&gt;             &lt;ColumnDefinition Width=&quot;auto&quot;&gt;&lt;\/ColumnDefinition&gt;             &lt;ColumnDefinition Width=&quot;auto&quot;&gt;&lt;\/ColumnDefinition&gt;         &lt;\/Grid.ColumnDefinitions&gt;         &lt;TextBlock Grid.Row=&quot;0&quot; Grid.Column=&quot;0&quot; Margin=&quot;5,5,5,5&quot; FontSize=&quot;16&quot; FontWeight=&quot;Bold&quot;&gt;\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0438\u0437\u0434\u0435\u043b\u0438\u044f:&lt;\/TextBlock&gt;         &lt;TextBlock Grid.Row=&quot;1&quot; Grid.Column=&quot;0&quot; Margin=&quot;5,5,5,5&quot; FontSize=&quot;16&quot;&gt;\u0414\u0438\u0430\u043c\u0435\u0442\u0440 \u0440\u0435\u0437\u044c\u0431\u044b:&lt;\/TextBlock&gt;         &lt;TextBlock Grid.Row=&quot;2&quot; Grid.Column=&quot;0&quot; Margin=&quot;5,5,5,5&quot; FontSize=&quot;16&quot;&gt;\u0412\u044b\u0441\u043e\u0442\u0430 \u0433\u043e\u043b\u043e\u0432\u043a\u0438:&lt;\/TextBlock&gt;         &lt;TextBlock Grid.Row=&quot;3&quot; Grid.Column=&quot;0&quot; Margin=&quot;5,5,5,5&quot; FontSize=&quot;16&quot;&gt;\u0420\u0430\u0437\u043c\u0435\u0440 \u043f\u043e\u0434 \u043a\u043b\u044e\u0447:&lt;\/TextBlock&gt;         &lt;TextBlock Grid.Row=&quot;4&quot; Grid.Column=&quot;0&quot; Margin=&quot;5,5,5,5&quot; FontSize=&quot;16&quot;&gt;\u0414\u043b\u0438\u043d\u0430:&lt;\/TextBlock&gt;         &lt;Button Grid.Row=&quot;5&quot; Grid.Column=&quot;1&quot; Width=&quot;170&quot; Height=&quot;30&quot; Margin=&quot;5,5,5,5&quot; Content=&quot;\u041f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c&quot; FontSize=&quot;16&quot;&gt;&lt;\/Button&gt;                 &lt;TextBox Grid.Column=&quot;1&quot; Grid.Row=&quot;1&quot; Margin=&quot;5,5,5,5&quot;&gt;&lt;\/TextBox&gt;         &lt;TextBox Grid.Column=&quot;1&quot; Grid.Row=&quot;2&quot; Margin=&quot;5,5,5,5&quot;&gt;&lt;\/TextBox&gt;         &lt;TextBox Grid.Column=&quot;1&quot; Grid.Row=&quot;3&quot; Margin=&quot;5,5,5,5&quot;&gt;&lt;\/TextBox&gt;         &lt;TextBox Grid.Column=&quot;1&quot; Grid.Row=&quot;4&quot; Margin=&quot;5,5,5,5&quot;&gt;&lt;\/TextBox&gt;            &lt;\/Grid&gt; &lt;\/Window&gt; <\/code><\/pre>\n<p>  \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u043d\u0430 \u0440\u0438\u0441\u0443\u043d\u043a\u0435 \u043d\u0438\u0436\u0435.<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/e7d\/2ac\/ffc\/e7d2acffc3c69c8406b158b1a0ff2342.jpg\"\/>  <\/p>\n<h4>\u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f<\/h4>\n<p>  <\/p>\n<pre><code class=\"cs\">public partial class MainWindow : Window     {         public MainWindow() {                     InitializeComponent();         }          public SldWorks swApp;          void Button_Click_1(object sender, RoutedEventArgs e) {                     ModelDoc2 swDoc = null;             PartDoc swPart = null;             DrawingDoc swDrawing = null;             AssemblyDoc swAssembly = null;             bool boolstatus = false;             int longstatus = 0;             int longwarnings = 0;             swDoc = ((ModelDoc2)(swApp.ActiveDoc));              OpenDoc(ref swDoc, ref longstatus, ref longwarnings);             swApp.ActivateDoc2(&quot;\u0411\u043e\u043b\u0442&quot;, false, ref longstatus);             swDoc = ((ModelDoc2)(swApp.ActiveDoc));                          ModelView myModelView = null;              boolstatus = GrooveDiameter(swDoc, boolstatus);             boolstatus = SetBoltHeadHeight(swDoc, boolstatus);             boolstatus = SetDimensionUnderKey(swDoc, boolstatus);              boolstatus = SetLength(swDoc, boolstatus);         }          \/\/\u0417\u0430\u0434\u0430\u0442\u044c \u0434\u043b\u0438\u043d\u0443 \u0431\u043e\u043b\u0442\u0430         static bool SetLength(ModelDoc2 swDoc, bool boolstatus) {                     boolstatus = swDoc.Extension.SelectByID2(&quot;&quot;, &quot;FACE&quot;, 0.011912467420266637, 0.01846469011343288, 0.0037872311733622155, false, 0, null, 0);             boolstatus = swDoc.Extension.SelectByID2(&quot;D1@\u042d\u0441\u043a\u0438\u04371@\u0411\u043e\u043b\u0442.SLDPRT&quot;, &quot;DIMENSION&quot;, 0.047351053302585169, 0.019301296053367275, 0.0028786441805853363, true, 0, null, 0);             boolstatus = swDoc.EditRebuild3();             swDoc.ClearSelection2(true);             return boolstatus;         }                  \/\/\u0417\u0430\u0434\u0430\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440 \u043f\u043e\u0434 \u043a\u043b\u044e\u0447 \u0431\u043e\u043b\u0442\u0430         static bool SetDimensionUnderKey(ModelDoc2 swDoc, bool boolstatus) {                     boolstatus = swDoc.Extension.SelectByID2(&quot;&quot;, &quot;FACE&quot;, -0.00036826155354674484, 0.051999999999850388, -0.0013844273092900039, false, 0, null, 0);             boolstatus = swDoc.Extension.SelectByID2(&quot;D4@\u042d\u0441\u043a\u0438\u04371@\u0411\u043e\u043b\u0442.SLDPRT&quot;, &quot;DIMENSION&quot;, 0.0079871009577274082, 0.035833016414888383, -0.013439947146820423, true, 0, null, 0);             boolstatus = swDoc.EditRebuild3();             swDoc.ClearSelection2(true);             return boolstatus;         }                  \/\/\u0417\u0430\u0434\u0430\u0442\u044c \u0432\u044b\u0441\u043e\u0442\u0443 \u0433\u043e\u043b\u043e\u0432\u043a\u0438 \u0431\u043e\u043b\u0442\u0430         static bool SetBoltHeadHeight(ModelDoc2 swDoc, bool boolstatus) {                     boolstatus = swDoc.Extension.SelectByID2(&quot;&quot;, &quot;FACE&quot;, 0.0025916945023696791, 0.022486595775220126, 0.012228373547031879, false, 0, null, 0);             boolstatus = swDoc.Extension.SelectByID2(&quot;D2@\u042d\u0441\u043a\u0438\u04371@\u0411\u043e\u043b\u0442.SLDPRT&quot;, &quot;DIMENSION&quot;, 0.032400529167230879, 0.043963039647934993, 0, true, 0, null, 0);             boolstatus = swDoc.EditRebuild3();             swDoc.ClearSelection2(true);             return boolstatus;         }          \/\/\u0417\u0430\u0434\u0430\u0442\u044c \u0434\u0438\u0430\u043c\u0435\u0442\u0440 \u0440\u0435\u0437\u044c\u0431\u044b \u0431\u043e\u043b\u0442\u0430         static bool GrooveDiameter(ModelDoc2 swDoc, bool boolstatus) {                     boolstatus = swDoc.Extension.SelectByID2(&quot;&quot;, &quot;FACE&quot;, -0.00081167638456329516, 0.026711469979688613, 0.0089633242408808655, false, 0, null, 0);             boolstatus = swDoc.Extension.SelectByID2(&quot;D3@\u042d\u0441\u043a\u0438\u04371@\u0411\u043e\u043b\u0442.SLDPRT&quot;, &quot;DIMENSION&quot;, 0.0056429925389302749, 0.040324953527420437, 0, true, 0, null, 0);             boolstatus = swDoc.EditRebuild3();             swDoc.ClearSelection2(true);             return boolstatus;         }          \/\/\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442         void OpenDoc(ref ModelDoc2 swDoc, ref int longstatus, ref int longwarnings) {                     swDoc = ((ModelDoc2)(swApp.OpenDoc6(&quot;D:\\\\\u0425\u0410\u0411\u0420\\\\Item2\\\\\u0411\u043e\u043b\u0442.SLDPRT&quot;, 1, 0, &quot;&quot;, ref longstatus, ref longwarnings)));         }     } <\/code><\/pre>\n<p>  <\/p>\n<h4>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h4>\n<p>   \u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0446\u0435\u043b\u044c \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445 API \u2013 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u2013 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438. \u0412 \u0440\u0430\u043c\u043a\u0430\u0445 \u0434\u0430\u043d\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0431\u044b\u043b\u0430 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0430 \u043b\u0438\u0448\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u0440\u0435\u043f\u0435\u0436\u043d\u044b\u0445 \u0438\u0437\u0434\u0435\u043b\u0438\u0439 (\u0431\u043e\u043b\u0442\u043e\u0432). \u0412 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u044b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438:<br \/>  \u2022 API \u2013 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u043c\u043e\u0434\u0435\u043b\u0438 \u0442\u0438\u043f\u043e\u0432\u044b\u0445 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439 \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u043c \u043f\u0430\u043a\u0435\u0442\u0435 SolidWorks;<br \/>  \u2022 API \u2013 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0441\u043a\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438;<br \/>  \u2022 API \u2013 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u0438\u0437\u0434\u0435\u043b\u0438\u0439.    \t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/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=\"http:\/\/habrahabr.ru\/post\/204098\/\"> http:\/\/habrahabr.ru\/post\/204098\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">\n<h4>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h4>\n<p>  \u0412 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0435 \u0431\u044b\u043b\u0438 \u0438\u0437\u043b\u043e\u0436\u0435\u043d\u044b \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 API \u2013 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0442\u0440\u0435\u0445\u043c\u0435\u0440\u043d\u043e\u0433\u043e \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f SolidWorks. \u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e API \u2013 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u0434\u043b\u044f \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u044f \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u0430 \u2013 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430.<br \/>  \u041e\u0434\u043d\u0438\u043c \u0438\u0437 \u044d\u0442\u0430\u043f\u043e\u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0442\u0440\u0435\u0445\u043c\u0435\u0440\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u0438\u0437\u0434\u0435\u043b\u0438\u044f. \u0412 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u0443\u0437\u043b\u0430\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u044b\u0445 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0441\u0430\u043c\u0438\u043c \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u043e\u043c \u043a\u0440\u0435\u043f\u0435\u0436\u043d\u044b\u0445 \u0438\u0437\u0434\u0435\u043b\u0438\u0439.<br \/>  \u0420\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0439 \u0432 SolidWorks, \u043e\u0434\u043d\u0430\u043a\u043e \u0435\u0441\u043b\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043a\u0440\u0435\u043f\u0435\u0436\u043d\u044b\u0435 \u0438\u0437\u0434\u0435\u043b\u0438\u044f, \u0442\u043e \u0438\u043d\u0436\u0435\u043d\u0435\u0440 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0437\u043d\u0430\u0442\u044c \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043a\u0430\u043a\u0438\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u044b \u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0435\u043c\u0443 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f. \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438 \u0441\u0431\u043e\u0440\u043a\u0438 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u0434\u0435\u0442\u0430\u043b\u0435\u0439 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c\u044e \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u0440\u0435\u043f\u0435\u0436\u043d\u044b\u0445 \u0438\u0437\u0434\u0435\u043b\u0438\u0439.<br \/>  \u0412 \u0440\u0430\u043c\u043a\u0430\u0445 \u044d\u0442\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043e API \u2013 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438 \u0431\u043e\u043b\u0442\u0430, \u0441 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438.<\/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-204098","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/204098","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=204098"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/204098\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=204098"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=204098"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=204098"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}