{"id":461,"date":"2023-03-30T17:17:00","date_gmt":"2023-03-30T09:17:00","guid":{"rendered":"http:\/\/localhost:8080\/?p=461"},"modified":"2023-03-30T17:17:00","modified_gmt":"2023-03-30T09:17:00","slug":"c-solidworks-%e4%ba%8c%e6%ac%a1%e5%bc%80%e5%8f%91-api-%e6%8f%90%e9%ab%98%e8%8d%89%e5%9b%be%e7%bb%98%e5%88%b6%e6%95%88%e7%8e%87","status":"publish","type":"post","link":"https:\/\/blog.ke-zhi.com\/?p=461","title":{"rendered":"C# SolidWorks \u4e8c\u6b21\u5f00\u53d1 API&#8212;\u63d0\u9ad8\u8349\u56fe\u7ed8\u5236\u6548\u7387"},"content":{"rendered":"<h1> <a href=\"https:\/\/www.cnblogs.com\/solidworksapi\/p\/17369416.html\" target=\"_blank\" rel=\"nofollow noopener\"> <span>C# SolidWorks \u4e8c\u6b21\u5f00\u53d1 API&#8212;\u63d0\u9ad8\u8349\u56fe\u7ed8\u5236\u6548\u7387<\/span> <\/a> <\/h1>\n<p>\u6700\u8fd1\u5728\u56fe\u4e66\u9986\u501f\u4e86\u672c\u300asolidworks api\u4e8c\u6b21\u5f00\u53d1\u5b9e\u4f8b\u8be6\u89e3\u300b \u6765\u5b66\u4e60\u4e00\u4e0b\u3002<\/p>\n<p>\u53d1\u73b0\u4e86\u4e00\u4e2a\u540e\u7eed\u5f00\u53d1\u65f6\u9700\u8981\u6ce8\u610f\u7684\u95ee\u9898\uff0c\u4ee5\u524d\u5728\u753b\u8349\u56fe\u7684\u65f6\u5019\uff0c\u6211\u90fd\u5148\u7528\u4ee3\u7801\u8bbe\u5b9a\u6355\u6349\u6a21\u5f0f\u540e\u518d\u753b\u7ebf\uff0c\u753b\u5b8c\u4e4b\u540e\u518d\u6062\u590d\u8bbe\u7f6e\u3002<br \/> <img decoding=\"async\" src=\"https:\/\/img-blog.csdnimg.cn\/20201021085915966.png#pic_center\" class=\"aligncenter\"><br \/> <img decoding=\"async\" src=\"https:\/\/img-blog.csdnimg.cn\/20201021085901353.png?x-oss-process=image\/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3plbmdxaDAzMTQ=,size_16,color_FFFFFF,t_70#pic_center\" class=\"aligncenter\"><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/img-blog.csdnimg.cn\/20201021085022990.png?x-oss-process=image\/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3plbmdxaDAzMTQ=,size_16,color_FFFFFF,t_70#pic_center\" class=\"aligncenter\"><\/p>\n<p>\u5176\u5b9esolidworks\u63d0\u4f9b\u4e86\u4e00\u4e2a\u529f\u80fd\uff1a<br \/> SketchManager\u4e2d\u7684<strong>AddToDB<\/strong>\u9009\u9879\uff0c \u8fd9\u5e94\u8be5\u7c7b\u4f3c\u4e8e\u4e4b\u524d\u7684\u6240\u8bf4\u7684\u7a0b\u5e8f\u7684CommandInProgress\u6a21\u5f0f\u3002\u8bbe\u5b9a\u4e4b\u540e\u662f\u76f4\u63a5\u5199\u5165\u5185\u90e8\u6570\u636e\u5e93<br \/> \u597d\u5904\u662f\uff0c\u8fd9\u6837\u4e0d\u4f1a\u6709\u4efb\u4f55\u6355\u6349\u7684\u53d1\u751f\u3002<br \/> <strong>\u9700\u8981\u6ce8\u610f\u7684\u662f\u4f7f\u7528\u8fc7\u540e\u4e00\u5b9a\u8981\u5c06\u8bbe\u7f6e\u6539\u56de\u6765\uff0c\u4e0d\u7136\u7528\u6237\u65e0\u6cd5\u8fdb\u4e00\u6b65\u64cd\u4f5c\u4e86\u3002<\/strong><br \/> <img decoding=\"async\" src=\"https:\/\/img-blog.csdnimg.cn\/20201021090026977.png?x-oss-process=image\/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3plbmdxaDAzMTQ=,size_16,color_FFFFFF,t_70#pic_center\" class=\"aligncenter\"><br \/> \u8fd8\u9700\u8981\u6ce8\u610f\u7684\uff0c\u5728\u7ed8\u5236\u8349\u56fe\u4e4b\u540e \uff0c\u662f\u5426\u7acb\u5373\u663e\u793a\u4e5f\u662f\u5bf9\u6027\u80fd\u6709\u5f71\u54cd\u7684\u3002<\/p>\n<p>\u53ef\u4ee5\u5728\u5b8c\u6210\u4e4b\u540e \u4f7f\u7528GraphicesRedraw \u6216\u8005EditRebuild3 \u663e\u793a\u8349\u56fe\u3002 <strong>\u524d\u8005\u6bd4\u540e\u8005\u5feb<\/strong> \u8fd9\u91cc\u6211\u4e5f\u6ca1\u6709\u8fdb\u884c\u6d4b\u8bd5\uff0c\u53ea\u662fapi\u662f\u8fd9\u6837\u5907\u6ce8\u7684\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/img-blog.csdnimg.cn\/20201020165850839.png?x-oss-process=image\/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3plbmdxaDAzMTQ=,size_16,color_FFFFFF,t_70#pic_center\" class=\"aligncenter\"><\/p>\n<p>\u8fd8\u6709\u4e00\u70b9\uff0c\u6709\u65f6\u5019\u5927\u91cf\u64cd\u4f5c\u7684\u65f6\u5019\u7981\u7528\u7279\u5f81\u6811\u7684\u66f4\u65b0\u4e5f\u53ef\u4ee5\u51cf\u5c11solidworks\u7684\u5f00\u9500\uff0c\u53ef\u4ee5\u5728\u5b8c\u6210\u6240\u6709\u64cd\u4f5c\u4e4b\u540e \u518d\u542f\u52a8\u7279\u5f81\u6811\u7684\u5237\u65b0\u3002<br \/> \/\/swModel.Extension.HideFeatureManager(true);<\/p>\n<p>\u7c7b\u4f3c\u7684\u64cd\u4f5c\u8fd8\u6709EnableBackgroundProcessing \uff0c\u542f\u7528\u540e\u53f0\u6a21\u5f0f\uff0c\u8fd9\u4e2a\u597d\u50cf\u662f\u754c\u9762\u4e0d\u52a8\uff0c\u5b8c\u5168\u5728\u540e\u53f0\uff0c\u51cf\u5c11\u663e\u5361\u7684\u5f00\u9500\u3002<br \/> \/\/swApp.EnableBackgroundProcessing = false;<\/p>\n<p>\u8fd8\u53ef\u4ee5\u7981\u6b62\u8bb0\u5f55\u6587\u4ef6\u8def\u5f84\uff1a<br \/> \/\/\u7981\u6b62\u8bb0\u5f55\u6587\u4ef6\u8def\u5f84<br \/> swApp.SetUserPreferenceToggle((int)swUserPreferenceToggle_e.swLockRecentDocumentsList, true);<\/p>\n<p>          posted @<br \/>\n<span>2023-03-30 17:17<\/span>&nbsp;<br \/>\n<a href=\"https:\/\/www.cnblogs.com\/solidworksapi\/\" target=\"_blank\" rel=\"nofollow noopener\">painezeng<\/a>&nbsp; \u9605\u8bfb(<br \/>\n<span>0<\/span>)&nbsp; \u8bc4\u8bba(<br \/>\n<span>0<\/span>)&nbsp;<br \/>\n<a href=\"https:\/\/i.cnblogs.com\/EditPosts.aspx?postid=17369416\" rel=\"nofollow noopener\" target=\"_blank\">\u7f16\u8f91<\/a>&nbsp;<br \/>\n<a href=\"\" target=\"_blank\" rel=\"nofollow noopener\">\u6536\u85cf<\/a>&nbsp;<br \/>\n<a href=\"\" target=\"_blank\" rel=\"nofollow noopener\">\u4e3e\u62a5<\/a> &nbsp;<br \/>\n<a href=\"\" target=\"_blank\" rel=\"nofollow noopener\">\u6765\u6e90<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>C# SolidWorks \u4e8c\u6b21\u5f00\u53d1 API&#8212;\u63d0\u9ad8\u8349\u56fe\u7ed8\u5236\u6548\u7387 \u6700\u8fd1\u5728\u56fe\u4e66\u9986\u501f\u4e86\u672c\u300asolidwo [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":462,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[4,5],"tags":[7,6,8],"series":[],"class_list":["post-461","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-solidworks-","category-solidworks","tag-api","tag-solidworks","tag-8"],"views":253,"_links":{"self":[{"href":"https:\/\/blog.ke-zhi.com\/index.php?rest_route=\/wp\/v2\/posts\/461","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.ke-zhi.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.ke-zhi.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.ke-zhi.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.ke-zhi.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=461"}],"version-history":[{"count":0,"href":"https:\/\/blog.ke-zhi.com\/index.php?rest_route=\/wp\/v2\/posts\/461\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.ke-zhi.com\/index.php?rest_route=\/wp\/v2\/media\/462"}],"wp:attachment":[{"href":"https:\/\/blog.ke-zhi.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=461"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.ke-zhi.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=461"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.ke-zhi.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=461"},{"taxonomy":"series","embeddable":true,"href":"https:\/\/blog.ke-zhi.com\/index.php?rest_route=%2Fwp%2Fv2%2Fseries&post=461"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}