<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: API Edit in new window in Robot Structural Analysis Forum</title>
    <link>https://forums.autodesk.com/t5/robot-structural-analysis-forum/api-edit-in-new-window/m-p/9198343#M22031</link>
    <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You have to make additional selections and add it \ them to window&lt;/P&gt;
&lt;P&gt;Example&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;    Dim NodeSelection As RobotSelection
    Set NodeSelection = RobApp.Project.Structure.Selections.Create(I_OT_NODE)
    NodeSelection.FromText "1 2 3 4"&lt;/PRE&gt;
&lt;PRE&gt;&lt;BR /&gt;... &lt;BR /&gt;viewRobot.Selection.Set I_OT_NODE, NodeSelection &lt;BR /&gt;viewRobot.Selection.Set I_OT_BAR, Rsel &lt;BR /&gt;...&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 12 Dec 2019 11:14:49 GMT</pubDate>
    <dc:creator>Rafal.Gaweda</dc:creator>
    <dc:date>2019-12-12T11:14:49Z</dc:date>
    <item>
      <title>(API) Edit in new window</title>
      <link>https://forums.autodesk.com/t5/robot-structural-analysis-forum/api-edit-in-new-window/m-p/9148374#M22028</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm trying to create a function using the API (in C#) to open the current selection of elements in a new window (hiding all others). Similar to the function of button in the snip below?&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Capture.PNG" style="width: 190px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/698191iBCCCE4B23058D4D0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Fri, 13 Dec 2019 16:27:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/robot-structural-analysis-forum/api-edit-in-new-window/m-p/9148374#M22028</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-12-13T16:27:40Z</dc:date>
    </item>
    <item>
      <title>Re: API Edit in new window</title>
      <link>https://forums.autodesk.com/t5/robot-structural-analysis-forum/api-edit-in-new-window/m-p/9148655#M22029</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example code&lt;/P&gt;
&lt;PRE&gt;    Dim viewRobot As IRobotView3
    
    Dim Rsel As RobotSelection
    Set Rsel = RobApp.Project.Structure.Selections.Create(I_OT_BAR)
    Rsel.FromText "3"
    
    Set viewRobot = RobApp.Project.ViewMngr.CreateView(I_VT_STANDARD)

    viewRobot.Selection.Set I_OT_BAR, Rsel
    viewRobot.Visible = True
    viewRobot.Redraw (0)
    RobApp.Project.ViewMngr.Refresh
    &lt;/PRE&gt;</description>
      <pubDate>Fri, 15 Nov 2019 11:03:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/robot-structural-analysis-forum/api-edit-in-new-window/m-p/9148655#M22029</guid>
      <dc:creator>Rafal.Gaweda</dc:creator>
      <dc:date>2019-11-15T11:03:14Z</dc:date>
    </item>
    <item>
      <title>Re: API Edit in new window</title>
      <link>https://forums.autodesk.com/t5/robot-structural-analysis-forum/api-edit-in-new-window/m-p/9198323#M22030</link>
      <description>&lt;P&gt;Hi Rafal,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry for the slow response, I've been busy! I've tried this out, but it doesn't quite replicate the function. I've included a screen capture of the results. On the left, there is the full model, middle is the result of the function you suggested, and on the right is the desired outcome. It seems that the script you've given me isolates that bar, but leaves all nodes and panels intact. Could you suggest a way to get round that? Is there also a way of copy the view parameters (i.e. section shapes etc) from the original view and applying them to the new view?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've also included a snip of my exact code which I've done my best to translate into C# for my uses (barsSelect is the selection of bars).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 12 Dec 2019 11:05:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/robot-structural-analysis-forum/api-edit-in-new-window/m-p/9198323#M22030</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-12-12T11:05:21Z</dc:date>
    </item>
    <item>
      <title>Re: API Edit in new window</title>
      <link>https://forums.autodesk.com/t5/robot-structural-analysis-forum/api-edit-in-new-window/m-p/9198343#M22031</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You have to make additional selections and add it \ them to window&lt;/P&gt;
&lt;P&gt;Example&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;    Dim NodeSelection As RobotSelection
    Set NodeSelection = RobApp.Project.Structure.Selections.Create(I_OT_NODE)
    NodeSelection.FromText "1 2 3 4"&lt;/PRE&gt;
&lt;PRE&gt;&lt;BR /&gt;... &lt;BR /&gt;viewRobot.Selection.Set I_OT_NODE, NodeSelection &lt;BR /&gt;viewRobot.Selection.Set I_OT_BAR, Rsel &lt;BR /&gt;...&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Dec 2019 11:14:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/robot-structural-analysis-forum/api-edit-in-new-window/m-p/9198343#M22031</guid>
      <dc:creator>Rafal.Gaweda</dc:creator>
      <dc:date>2019-12-12T11:14:49Z</dc:date>
    </item>
    <item>
      <title>Re: API Edit in new window</title>
      <link>https://forums.autodesk.com/t5/robot-structural-analysis-forum/api-edit-in-new-window/m-p/9198381#M22032</link>
      <description>&lt;P&gt;Brilliant, thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 12 Dec 2019 11:36:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/robot-structural-analysis-forum/api-edit-in-new-window/m-p/9198381#M22032</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-12-12T11:36:32Z</dc:date>
    </item>
    <item>
      <title>Re: (API) Edit in new window</title>
      <link>https://forums.autodesk.com/t5/robot-structural-analysis-forum/api-edit-in-new-window/m-p/11264190#M22033</link>
      <description>&lt;P&gt;Did you ever encounter a problem that Claddings are not hiding? Everything other hides correctly but claddings stay visible.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;import clr
clr.AddReferenceToFileAndPath("C:/Program Files/Autodesk/Autodesk Robot Structural Analysis Professional 2019/System/Exe/Interop.RobotOM.dll")
from RobotOM import *
from System import Object

application = RobotApplicationClass()
project = application.Project
structure = project.Structure
labels = structure.Labels
objects = structure.Objects
application.Interactive = False
groupNumb = structure.Groups.GetCount(IRobotObjectType.I_OT_BAR)
allgroups = [structure.Groups.Get(IRobotObjectType.I_OT_BAR,x) for x in range(1,3)]

nodeSel = project.Structure.Selections.Create(IRobotObjectType.I_OT_NODE)
nodeSel.Clear()
project.Structure.Selections.Create(IRobotObjectType.I_OT_OBJECT)
panelSel = project.Structure.Selections.Create(IRobotObjectType.I_OT_PANEL)
panelSel.Clear()
FESel = project.Structure.Selections.Create(IRobotObjectType.I_OT_FINITE_ELEMENT)
FESel.Clear()
allSel = structure.Selections.CreateFull(IRobotObjectType.I_OT_OBJECT)
allSel.Clear()

backLog = []

for barSelection in allgroups:
    viewRobot = project.ViewMngr.CreateView(IRobotViewType.I_VT_STANDARD)

    newSel = project.Structure.Selections.Create(IRobotObjectType.I_OT_BAR)
    newSel.FromText(barSelection.SelList)
    
    
    viewRobot.Selection.Set(IRobotObjectType.I_OT_NODE, nodeSel)
    viewRobot.Selection.Set(IRobotObjectType.I_OT_PANEL, panelSel)
    viewRobot.Selection.Set(IRobotObjectType.I_OT_FINITE_ELEMENT, FESel)
    viewRobot.Selection.Set(IRobotObjectType.I_OT_OBJECT, allSel)
    
    viewRobot.Selection.Set(IRobotObjectType.I_OT_BAR, newSel)
    viewRobot.Visible = True
    viewRobot.Title = "LOOL"
    backLog.append(barSelection.Name)
    viewRobot.Redraw(0)


application.Interactive = True
OUT = allSel.Count&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/589195"&gt;@Rafal.Gaweda&lt;/a&gt;&amp;nbsp;Could you probably help?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jun 2022 15:15:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/robot-structural-analysis-forum/api-edit-in-new-window/m-p/11264190#M22033</guid>
      <dc:creator>lukasz_koc2</dc:creator>
      <dc:date>2022-06-28T15:15:35Z</dc:date>
    </item>
  </channel>
</rss>

