{"id":907,"date":"2024-06-26T08:30:13","date_gmt":"2024-06-26T00:30:13","guid":{"rendered":"http:\/\/www.wyrcad.com\/?p=907"},"modified":"2024-06-27T13:19:05","modified_gmt":"2024-06-27T05:19:05","slug":"autocad-%e5%87%bd%e6%95%b0%e7%b3%bb%e5%88%97%e4%b9%8b%e4%b8%80","status":"publish","type":"post","link":"https:\/\/www.wyrcad.com\/?p=907","title":{"rendered":"AutoCAD \u51fd\u6570\u7cfb\u5217\u4e4b\u4e00"},"content":{"rendered":"\n<p>Public Function SetExist(ByVal vDraw As Variant, ByVal sSet As String) As Boolean<br>Dim I As Integer, J As Integer<br>SetExist = False<br>If vDraw Is Nothing Then Exit Function<br>For I = 0 To vDraw.SelectionSets.Count &#8211; 1<br>If vDraw.SelectionSets.Item(I).Name = sSet Then SetExist = True<br>Next I<br>End Function<\/p>\n\n\n\n<p>Public Function DictionaryExist(ByVal vDraw As Variant, ByVal sDict As String) As Boolean<br>Dim I As Integer, J As Integer<br>On Error GoTo ERR_NO_KEY<br>DictionaryExist = False<br>If vDraw Is Nothing Then Exit Function<br>Set oDictionary = vDraw.Dictionaries.Item(sDict) &#8216;\u8bd5\u9519<br>DictionaryExist = True<br>On Error GoTo 0<br>Exit Function<br>ERR_NO_KEY: &#8216;primary key<br>DictionaryExist = False<br>On Error GoTo 0<br>End Function<\/p>\n\n\n\n<p>Public Function AppExist(ByVal vDraw As Variant, ByVal sApp As String, ByVal sDict As String) As Boolean<br>Dim I As Integer, J As Integer<br>AppExist = False<br>If vDraw Is Nothing Then Exit Function<br>If Not DictionaryExist(oDraw, sDict) Then Exit Function<br>Set oDictionary = vDraw.Dictionaries.Item(sDict)<br>Dim XTypeOut As Variant<br>Dim XValueOut As Variant<br>oDictionary.GetXData &#8220;&#8221;, XTypeOut, XValueOut<br>If Not IsArray(XTypeOut) Then Exit Function<br>If Not IsArray(XValueOut) Then Exit Function<br>For I = LBound(XTypeOut) To UBound(XTypeOut)<br>If XTypeOut(I) = 1001 And XValueOut(I) = sApp Then<br>AppExist = True<br>End If<br>Next I<br>End Function<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Public Function SetExist(ByVal vDraw As Variant, ByVal  &hellip; <a href=\"https:\/\/www.wyrcad.com\/?p=907\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">\u201cAutoCAD \u51fd\u6570\u7cfb\u5217\u4e4b\u4e00\u201d<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[24,17],"class_list":["post-907","post","type-post","status-publish","format-standard","hentry","category-bianchengyuandi","tag-vb","tag-biancheng"],"_links":{"self":[{"href":"https:\/\/www.wyrcad.com\/index.php?rest_route=\/wp\/v2\/posts\/907","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wyrcad.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wyrcad.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wyrcad.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wyrcad.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=907"}],"version-history":[{"count":3,"href":"https:\/\/www.wyrcad.com\/index.php?rest_route=\/wp\/v2\/posts\/907\/revisions"}],"predecessor-version":[{"id":941,"href":"https:\/\/www.wyrcad.com\/index.php?rest_route=\/wp\/v2\/posts\/907\/revisions\/941"}],"wp:attachment":[{"href":"https:\/\/www.wyrcad.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=907"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wyrcad.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=907"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wyrcad.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=907"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}