<?xml version="1.0" encoding="windows-1250" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>CAD F&#243;rum : ActiveSelecti&#111;nSet po Query.Execute</title>
  <link>https://www.cadforum.cz/forum/</link>
  <description><![CDATA[Toto je XML obsahový kanál serveru; CAD F&#243;rum : Civil 3D, Map, InfraWorks, GIS : ActiveSelecti&#111;nSet po Query.Execute]]></description>
  <pubDate>Mon, 06 Apr 2026 07:50:34 +0000</pubDate>
  <lastBuildDate>Wed, 18 Jan 2006 11:32:12 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>https://www.cadforum.cz/forum/RSS_post_feed.asp?TID=1939</WebWizForums:feedURL>
  <image>
   <title><![CDATA[CAD F&#243;rum]]></title>
   <url>https://www.cadforum.cz/forum/forum_images/web_wiz_forums.png</url>
   <link>https://www.cadforum.cz/forum/</link>
  </image>
  <item>
   <title><![CDATA[ActiveSelecti&#111;nSet po Query.Execute : Zdravim, podobny kod som nasiel...]]></title>
   <link>https://www.cadforum.cz/forum/forum_posts.asp?TID=1939&amp;PID=8197&amp;title=activeselectionset-po-queryexecute#8197</link>
   <description>
    <![CDATA[<strong>Autor:</strong> <a href="https://www.cadforum.cz/forum/member_profile.asp?PF=1008">MarianA</a><br /><strong>Předmět:</strong> 1939<br /><strong>Zasláno:</strong> 18.led.2006 v 11:32<br /><br /><P>Zdravim,</P><P>podobny kod som nasiel ako odpoved na Query so Selection Setu na adn.autodesk.com. Je v podstate identicky, akurat volanie query je</P><P>ThisDrawing.SendCommand "(ade_qryexecute)" &amp; Chr(13)<BR></P><P>No aj tak to neriesi problem, ked je pocet objektov, ktore vyberie query rovne nule. Je nejaka moznost zistit vo VBA pocet objektov, ktore vrati Query?</P><P>dik</P><P>&nbsp;</P>]]>
   </description>
   <pubDate>Wed, 18 Jan 2006 11:32:12 +0000</pubDate>
   <guid isPermaLink="true">https://www.cadforum.cz/forum/forum_posts.asp?TID=1939&amp;PID=8197&amp;title=activeselectionset-po-queryexecute#8197</guid>
  </item> 
  <item>
   <title><![CDATA[ActiveSelecti&#111;nSet po Query.Execute : na upresnenie posielam kod. 1....]]></title>
   <link>https://www.cadforum.cz/forum/forum_posts.asp?TID=1939&amp;PID=8178&amp;title=activeselectionset-po-queryexecute#8178</link>
   <description>
    <![CDATA[<strong>Autor:</strong> <a href="https://www.cadforum.cz/forum/member_profile.asp?PF=1008">MarianA</a><br /><strong>Předmět:</strong> 1939<br /><strong>Zasláno:</strong> 17.led.2006 v 09:24<br /><br /><P>na upresnenie posielam kod.</P><P>1. v pripade ze&nbsp;v pripojenom vykrese&nbsp;sa nachadzaju objekty s layer = 0 SelectionSet&nbsp;po query vrati objekty s layer = 0. Ak sa nenachadza, vrati&nbsp;&nbsp;vsetky objekty z predchadzajuceho SelectionSet-u. </P><P>2. taktiez v danom pripade nefunguje Query.Execute, ale iba&nbsp;ThisDrawing.SendCommand "_MAPWSQUERYEXECUTE "<BR></P><P>Sub QueryToSelectionSet()<BR>&nbsp;&nbsp;&nbsp; Dim oQry As Query<BR>&nbsp;&nbsp;&nbsp; Dim oQLeaf As QueryLeaf<BR>&nbsp;&nbsp;&nbsp; Dim oQBranch As QueryBranch<BR>&nbsp;&nbsp;&nbsp; Dim oProject As Project<BR>&nbsp;&nbsp;&nbsp; Dim oUtil As AcadUtility<BR>&nbsp;&nbsp;&nbsp; Dim sLayer As String<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; sLayer = "0"<BR>&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; Dim oProjectOptions As ProjectOptions<BR>&nbsp;&nbsp;&nbsp; Dim oAcadSelSet As AcadSelectionSet<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; Set oUtil = ThisDrawing.Utility<BR>&nbsp;&nbsp;&nbsp; Set oProject =  ThisDrawing.Application.GetInterfaceObject("AutoCADMap.Appli cation").Projects(ThisDrawing)<BR>&nbsp;&nbsp;&nbsp; Set oProjectOptions = oProject.ProjectOptions<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; Set oAcadSelSet = ThisDrawing.SelectionSets.Add("AllObjectsSelected")<BR>&nbsp;&nbsp;&nbsp; If Not Nothing Is oAcadSelSet Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; oAcadSelSet.Select acSelectionSetAll<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; oUtil.Prompt "Before _MAPWSQUERYEXECUTE oAcadSelSet.Name = " &amp; oAcadSelSet.Name &amp; vbCrLf<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; oUtil.Prompt "Before _MAPWSQUERYEXECUTE oAcadSelSet.Count = " &amp; CStr(oAcadSelSet.Count) &amp; vbCrLf<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; oAcadSelSet.Clear<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; oAcadSelSet.Delete<BR>&nbsp;&nbsp;&nbsp; End If<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; oProjectOptions.MkSelSetWithQryObj = True<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; Set oQry = oProject.CurrQuery<BR>&nbsp;&nbsp;&nbsp; oQry.Clear<BR>&nbsp;&nbsp;&nbsp; Set oQBranch = oQry.QueryBranch<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; Set oQLeaf = oQBranch.Add(kPropertyCondition, kOperatorAnd)<BR>&nbsp;&nbsp;&nbsp; If True = oQLeaf.SetPropertyCond(kLayer, kCondEq, sLayer) Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; oQry.Mode = kQueryDraw<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If True = oQry.Define(oQBranch) Then<BR> '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;&nbsp; If False = oQry.Execute( ) Then<BR> '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ThisDrawing.Utility.Prompt "Query.Execute fail"<BR> '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;&nbsp; End If<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; ThisDrawing.SendCommand "_MAPWSQUERYEXECUTE "<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; oUtil.Prompt "Execute Query for Layer = " &amp; sLayer &amp; vbCrLf<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<BR>&nbsp;&nbsp;&nbsp; End If<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; Set oAcadSelSet = ThisDrawing.ActiveSelectionSet<BR>&nbsp;&nbsp;&nbsp; If Not Nothing Is oAcadSelSet Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; oUtil.Prompt "After _MAPWSQUERYEXECUTE oAcadSelSet.Name = " &amp; oAcadSelSet.Name &amp; vbCrLf<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; oUtil.Prompt "After _MAPWSQUERYEXECUTE oAcadSelSet.Count = " &amp; CStr(oAcadSelSet.Count) &amp; vbCrLf<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; oAcadSelSet.Clear<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; oAcadSelSet.Delete<BR>&nbsp;&nbsp;&nbsp; End If<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; oQry.Clear<BR>&nbsp;&nbsp;&nbsp; Set oUtil = Nothing<BR>&nbsp;&nbsp;&nbsp; Set oQry = Nothing<BR>&nbsp;&nbsp;&nbsp; Set oQBranch = Nothing<BR>&nbsp;&nbsp;&nbsp; Set oQLeaf = Nothing<BR>&nbsp;&nbsp;&nbsp; Set oAcadSelSet = Nothing<BR>&nbsp;&nbsp;&nbsp; <BR>End Sub<BR></P>]]>
   </description>
   <pubDate>Tue, 17 Jan 2006 09:24:26 +0000</pubDate>
   <guid isPermaLink="true">https://www.cadforum.cz/forum/forum_posts.asp?TID=1939&amp;PID=8178&amp;title=activeselectionset-po-queryexecute#8178</guid>
  </item> 
  <item>
   <title><![CDATA[ActiveSelecti&#111;nSet po Query.Execute : Zdravim, mam problem vo VBA pri...]]></title>
   <link>https://www.cadforum.cz/forum/forum_posts.asp?TID=1939&amp;PID=8092&amp;title=activeselectionset-po-queryexecute#8092</link>
   <description>
    <![CDATA[<strong>Autor:</strong> <a href="https://www.cadforum.cz/forum/member_profile.asp?PF=1008">MarianA</a><br /><strong>Předmět:</strong> 1939<br /><strong>Zasláno:</strong> 12.led.2006 v 14:22<br /><br /><P>Zdravim,&nbsp;&nbsp;</P><P>mam problem vo VBA pri ziskani objektov po Query.Execute do SelectionSet-u pomocou ThisDrawning.ActiveSelectionSet. V pripade, ze query vyberie nejake objekty ActiveSelectionSet ich vrati v SelectionSet-e.&nbsp;</P><P>&nbsp;Ked Query.Execute nevyberie ziadny objekt ActiveSelectionSet vrati objekty vybrate v poslednom SelectionSet-e. A nie prazdny SelectionSet ako ocakavam.</P><P>Vdaka za kazdu radu, pomoze mi tiez rada ako dostat vo VBA objekty pomocou Query do SelectionSet-u.</P><P> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  Marian</P>]]>
   </description>
   <pubDate>Thu, 12 Jan 2006 14:22:25 +0000</pubDate>
   <guid isPermaLink="true">https://www.cadforum.cz/forum/forum_posts.asp?TID=1939&amp;PID=8092&amp;title=activeselectionset-po-queryexecute#8092</guid>
  </item> 
 </channel>
</rss>