<?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: Used PreviewControl(ElementHost &amp;amp; PickPoint in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/used-previewcontrol-elementhost-amp-pickpoint/m-p/10451394#M33121</link>
    <description>&lt;P&gt;Window Form can complete all tasks. Click 'Ok' button don't call 'PickPoint', you should call it on your command.&lt;/P&gt;&lt;P&gt;It's a very easy way, but I try to use 'Iding' event to do... I think 'Iding' cannot be achieved.&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":face_with_tears_of_joy:"&gt;😂&lt;/span&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;    [Transaction(TransactionMode.Manual)]
    [Regeneration(RegenerationOption.Manual)]
    public class ButtonAutoClickingCmd : BaseCommand
    {
        public override void Run(ref string message, ElementSet elements)
        {
            var frm = new TestForm(_uiApp);

            frm.ShowDialog();

            _uiApp.ActiveUIDocument.Selection.PickPoint("xxx");

            using (var trans = new TransactionWrapper(_doc, "xxx"))
            {
                var lvl = _doc.First&amp;lt;Level&amp;gt;();

                Wall.Create(_doc, Line.CreateBound(XYZ.Zero, new XYZ(10, 0, 0)), lvl.Id, false);

                trans.Commit();
            }
        }
    }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 08 Jul 2021 01:58:33 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-07-08T01:58:33Z</dc:date>
    <item>
      <title>Used PreviewControl(ElementHost &amp; PickPoint</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/used-previewcontrol-elementhost-amp-pickpoint/m-p/9631796#M33108</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I'm try to&amp;nbsp;used PickPoint method in winform.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;When the PreviewControl is not in the winform, it's run well!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;But, the&amp;nbsp;&lt;SPAN&gt;PreviewControl is in the winform... It's not working...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;class TestEventHandler(IExternalEventHandler):
    def Execute(self, aa):
        try:
            # All the SnapTypes
            snapTypes = ObjectSnapTypes.Endpoints | ObjectSnapTypes.Midpoints | ObjectSnapTypes.WorkPlaneGrid | ObjectSnapTypes.Intersections | ObjectSnapTypes.Centers | ObjectSnapTypes.Perpendicular | ObjectSnapTypes.Points       
            PickPoint(snapTypes, "Pick Point")
  
        except Exception as e:
            print(e) 
            
    def GetName(self):
        return "TestEventHandler"

test_event_handler = TestEventHandler()           
ext_event = ExternalEvent.Create(test_event_handler)

class Test_Gui(Form):
    def __init__(self):
        self.btn_pickPoint = Button(Text = "Pick Point")
        self.btn_pickPoint.Location = Point(25, 5 +obj_hight)
        self.btn_pickPoint.Width = 100
        self.btn_pickPoint.Height = 50
        self.btn_pickPoint.Click += self.pick_pt
        
        currentViewId = uidoc_view.Id

        preview = PreviewControl(doc, currentViewId)
        elementHost = Integration.ElementHost()
        elementHost.Location = Point(0,0)
        elementHost.Dock = DockStyle.None
        elementHost.Size = Size(1100, 510)
        elementHost.TabIndex = 0
        elementHost.Parent = self
        elementHost.Child = preview
        elementHost.Location = Point(25, 5.4)
        
        self.Controls.Add(self.btn_pickPoint)
        self.Controls.Add(elementHost)
        
        self.Width = 1200
        self.Height = 980
    
    def pick_pt(self, sender, e):  
        test = ext_event.Raise()

def main():
    try:
        #Test_Gui().Show()
        Application.Run(Test_Gui())    

    except Exception as ex:
        print(ex)&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;▲The above code is part of the code.&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help me...&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jul 2020 09:25:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/used-previewcontrol-elementhost-amp-pickpoint/m-p/9631796#M33108</guid>
      <dc:creator>Ysuuny</dc:creator>
      <dc:date>2020-07-13T09:25:32Z</dc:date>
    </item>
    <item>
      <title>Re: Used PreviewControl(ElementHost &amp; PickPoint</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/used-previewcontrol-elementhost-amp-pickpoint/m-p/9632514#M33109</link>
      <description>&lt;P&gt;The dialog or form or window host this preview control must be modal.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jul 2020 15:03:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/used-previewcontrol-elementhost-amp-pickpoint/m-p/9632514#M33109</guid>
      <dc:creator>sonicer</dc:creator>
      <dc:date>2020-07-13T15:03:23Z</dc:date>
    </item>
    <item>
      <title>Re: Used PreviewControl(ElementHost &amp; PickPoint</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/used-previewcontrol-elementhost-amp-pickpoint/m-p/9633521#M33110</link>
      <description>&lt;P&gt;I'm already used model form...&amp;nbsp; (Application.Run())&lt;/P&gt;&lt;P&gt;Ummm..... This isn't it?&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jul 2020 00:38:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/used-previewcontrol-elementhost-amp-pickpoint/m-p/9633521#M33110</guid>
      <dc:creator>Ysuuny</dc:creator>
      <dc:date>2020-07-14T00:38:31Z</dc:date>
    </item>
    <item>
      <title>Re: Used PreviewControl(ElementHost &amp; PickPoint</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/used-previewcontrol-elementhost-amp-pickpoint/m-p/9634624#M33111</link>
      <description>&lt;P&gt;If you display a modal form in your Revit external command, it will block all other interaction with Revit, so you will not be able to use the&amp;nbsp;&lt;SPAN&gt;PickPoint method while the form is open. I do not understand why you say that you can.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If you display a PreviewControl within your modal form, or anywhere else, for that matter, it does not provide any support for the&amp;nbsp;PickPoint method.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The&amp;nbsp;PickPoint method only supports user selection in the Revit graphics screen, interacting directly with the Revit BIM model in the current active document.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The PreviewControl does not support any picking, or any other interaction either, for that matter, except pan and zoom.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The&amp;nbsp;PreviewControl is a pure preview control, providing read-only access and no user interaction with the model.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jul 2020 14:06:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/used-previewcontrol-elementhost-amp-pickpoint/m-p/9634624#M33111</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2020-07-14T14:06:32Z</dc:date>
    </item>
    <item>
      <title>Re: Used PreviewControl(ElementHost &amp; PickPoint</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/used-previewcontrol-elementhost-amp-pickpoint/m-p/9715680#M33112</link>
      <description>&lt;P&gt;Jeremy,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This isn't &lt;STRONG&gt;&lt;EM&gt;entirely&amp;nbsp;&lt;/EM&gt;&lt;/STRONG&gt;true.&amp;nbsp; When changing the orientation/rotation of a 3D view inside of a PreviewControl window, the model's 3D view will rotate as well.&amp;nbsp; Zoom/Pan do not have this effect.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-Scott&lt;/P&gt;</description>
      <pubDate>Thu, 27 Aug 2020 17:05:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/used-previewcontrol-elementhost-amp-pickpoint/m-p/9715680#M33112</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-08-27T17:05:23Z</dc:date>
    </item>
    <item>
      <title>Re: Used PreviewControl(ElementHost &amp; PickPoint</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/used-previewcontrol-elementhost-amp-pickpoint/m-p/9715739#M33113</link>
      <description>&lt;P&gt;Wow! Brilliant. Thank you very much for pointing that out!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I guess that is why it requires a transaction, then... I seem to remember something like that. It does, doesn't it?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Aug 2020 17:35:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/used-previewcontrol-elementhost-amp-pickpoint/m-p/9715739#M33113</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2020-08-27T17:35:12Z</dc:date>
    </item>
    <item>
      <title>Re: Used PreviewControl(ElementHost &amp; PickPoint</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/used-previewcontrol-elementhost-amp-pickpoint/m-p/9715810#M33114</link>
      <description>&lt;P&gt;Oddly enough -- no, it doesn't require it!&amp;nbsp; This could be like the PromptForFamilyInstancePlacement method which has a transaction control built in. The PreviewControl class is full of Event Handlers so maybe this is the case?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's the very basic sample of the external command I used to test this for 3D views.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;[Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)]
    class PreviewControlTest : IExternalCommand
    {
        public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
        {
            UIApplication uiapp = commandData.Application;
            UIDocument uidoc = uiapp.ActiveUIDocument;
            Document doc = uidoc.Document;

            WPF_GridContainer newGrid = new WPF_GridContainer();
            newGrid.theGrid.Children.Add(new PreviewControl(doc, new FilteredElementCollector(doc).OfClass(typeof(View3D)).FirstElementId()));
            newGrid.ShowDialog();

            return Result.Succeeded;
        }
    }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Aug 2020 18:11:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/used-previewcontrol-elementhost-amp-pickpoint/m-p/9715810#M33114</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-08-27T18:11:25Z</dc:date>
    </item>
    <item>
      <title>Re: Used PreviewControl(ElementHost &amp; PickPoint</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/used-previewcontrol-elementhost-amp-pickpoint/m-p/9715887#M33115</link>
      <description>&lt;P&gt;Well, I remember some issue with transactions ... I assume&amp;nbsp;it will refuse to run in read-only transaction mode, then...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Aug 2020 18:54:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/used-previewcontrol-elementhost-amp-pickpoint/m-p/9715887#M33115</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2020-08-27T18:54:07Z</dc:date>
    </item>
    <item>
      <title>Re: Used PreviewControl(ElementHost &amp; PickPoint</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/used-previewcontrol-elementhost-amp-pickpoint/m-p/9716004#M33116</link>
      <description>&lt;P&gt;Jeremy,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can confirm. Switching the TransactionMode to ReadOnly is now just hanging the command (never opens the window for the PreviewControl).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Funky stuff, but good to know!&lt;/P&gt;</description>
      <pubDate>Thu, 27 Aug 2020 20:02:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/used-previewcontrol-elementhost-amp-pickpoint/m-p/9716004#M33116</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-08-27T20:02:36Z</dc:date>
    </item>
    <item>
      <title>Re: Used PreviewControl(ElementHost &amp; PickPoint</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/used-previewcontrol-elementhost-amp-pickpoint/m-p/9723402#M33117</link>
      <description>&lt;P&gt;Dear Scott,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for your research and confirmation. I shared them for posterity on the blog:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://thebuildingcoder.typepad.com/blog/2020/09/code-signing-preview-and-element-type-predicates.html#3" target="_blank"&gt;https://thebuildingcoder.typepad.com/blog/2020/09/code-signing-preview-and-element-type-predicates.html#3&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jeremy&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Sep 2020 15:24:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/used-previewcontrol-elementhost-amp-pickpoint/m-p/9723402#M33117</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2020-09-01T15:24:45Z</dc:date>
    </item>
    <item>
      <title>Re: Used PreviewControl(ElementHost &amp; PickPoint</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/used-previewcontrol-elementhost-amp-pickpoint/m-p/10446345#M33118</link>
      <description>&lt;P&gt;Question 1: About PickPoint&lt;/P&gt;&lt;P&gt;Using WPF form CAN call 'PickPoint' on modal, but Windows Forms CANNOT do it. You can try it. I think that .NET has some inner problems.&lt;/P&gt;&lt;P&gt;My Solution: To solve it, I will call 'PickPoint' on IExterlCommand method.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Question 2: About PreviewControl&lt;/P&gt;&lt;P&gt;I don't sure the control can working on model or modaless. I think it work on modal. Bucause, if using EXTERNAL EVENT to do, UI refreshing is very difficult to me when working on window form.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NOTE: I don't know about the result of wpf test. You can tell me! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Summary:&lt;/P&gt;&lt;P&gt;1. Using modal to show form/window.&lt;/P&gt;&lt;P&gt;2. If you use win form, calling 'PickPoint' method on&amp;nbsp; your 'IExternalCommand'.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jul 2021 10:23:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/used-previewcontrol-elementhost-amp-pickpoint/m-p/10446345#M33118</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-07-06T10:23:01Z</dc:date>
    </item>
    <item>
      <title>Re: Used PreviewControl(ElementHost &amp; PickPoint</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/used-previewcontrol-elementhost-amp-pickpoint/m-p/10446799#M33119</link>
      <description>&lt;P&gt;kelicto,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't think the PickPoint in Win Forms is the same as the PickPoint you need for your Revit context.&amp;nbsp; As Jeremy says earlier:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;SPAN&gt;If you display a modal form in your Revit external command, it will block all other interaction with Revit, so you will not be able to use the&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;PickPoint method while the form is open. I do not understand why you say that you can.&lt;/SPAN&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;PickPoint here is the UIDocument.Selection PickPoint which is from within the Revit Context and refers to a point in the coordinate space inside the model.&amp;nbsp; The PickPoint method on your form will tell you about points on your screen perhaps, but nothing relating to a point in a Revit model.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you know of a way to transform a point from a canvas... maybe with the PreviewControl on the canvas... then maybe you can use some sort of extension method to approximate the point you need in the Revit model.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Scott&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jul 2021 13:43:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/used-previewcontrol-elementhost-amp-pickpoint/m-p/10446799#M33119</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-07-06T13:43:53Z</dc:date>
    </item>
    <item>
      <title>Re: Used PreviewControl(ElementHost &amp; PickPoint</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/used-previewcontrol-elementhost-amp-pickpoint/m-p/10448396#M33120</link>
      <description>&lt;P&gt;About PickPoint:&lt;/P&gt;&lt;P&gt;[Transaction(TransactionMode.Manual)]&lt;BR /&gt;[Regeneration(RegenerationOption.Manual)]&lt;BR /&gt;internal class GridSettingCmd : BaseCommand&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp; &amp;nbsp; public override void Run(ref string message, ElementSet elements)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; var location = _uiDoc.Selection.PickPoint(Resources.Msg_GridInsertionPoint);&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; new GridMainForm(_doc, location).ShowDialogPlus();&lt;BR /&gt;&amp;nbsp; &amp;nbsp; }&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;The best way that click 'ok' button to call 'PickPoint', but can't achieve this function on winform. So,&amp;nbsp; I think using WPF to do.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Point Transform:&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think 'The way to transform a point from a canvas' is very difficult. Bucause we don't have a suitable reference, best way is using WPF to do!&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jul 2021 01:36:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/used-previewcontrol-elementhost-amp-pickpoint/m-p/10448396#M33120</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-07-07T01:36:34Z</dc:date>
    </item>
    <item>
      <title>Re: Used PreviewControl(ElementHost &amp; PickPoint</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/used-previewcontrol-elementhost-amp-pickpoint/m-p/10451394#M33121</link>
      <description>&lt;P&gt;Window Form can complete all tasks. Click 'Ok' button don't call 'PickPoint', you should call it on your command.&lt;/P&gt;&lt;P&gt;It's a very easy way, but I try to use 'Iding' event to do... I think 'Iding' cannot be achieved.&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":face_with_tears_of_joy:"&gt;😂&lt;/span&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;    [Transaction(TransactionMode.Manual)]
    [Regeneration(RegenerationOption.Manual)]
    public class ButtonAutoClickingCmd : BaseCommand
    {
        public override void Run(ref string message, ElementSet elements)
        {
            var frm = new TestForm(_uiApp);

            frm.ShowDialog();

            _uiApp.ActiveUIDocument.Selection.PickPoint("xxx");

            using (var trans = new TransactionWrapper(_doc, "xxx"))
            {
                var lvl = _doc.First&amp;lt;Level&amp;gt;();

                Wall.Create(_doc, Line.CreateBound(XYZ.Zero, new XYZ(10, 0, 0)), lvl.Id, false);

                trans.Commit();
            }
        }
    }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jul 2021 01:58:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/used-previewcontrol-elementhost-amp-pickpoint/m-p/10451394#M33121</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-07-08T01:58:33Z</dc:date>
    </item>
  </channel>
</rss>

