<?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: Is there a batch method for placing adaptive component points? in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/is-there-a-batch-method-for-placing-adaptive-component-points/m-p/7666771#M53525</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;there is a performance problem with ElementTransformUtils:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/revit-api-forum/elementtransformutils-performance-issue/m-p/5775624/highlight/true#M11399" target="_blank"&gt;https://forums.autodesk.com/t5/revit-api-forum/elementtransformutils-performance-issue/m-p/5775624/highlight/true#M11399&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Seems to auto regenerate after each movement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Did you see the AdaptiveComponentInstanceUtils.MoveAdaptiveComponentInstance method?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Perhaps this one does not include a regenerate, I don't know.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Revitalizer&lt;/P&gt;</description>
    <pubDate>Fri, 05 Jan 2018 12:43:39 GMT</pubDate>
    <dc:creator>Revitalizer</dc:creator>
    <dc:date>2018-01-05T12:43:39Z</dc:date>
    <item>
      <title>Is there a batch method for placing adaptive component points?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/is-there-a-batch-method-for-placing-adaptive-component-points/m-p/7666601#M53524</link>
      <description>&lt;P&gt;Hello there,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I already wrote concerning my problem in a different thread but was able now to figure out that the bad performance is relied to movement of adaptive components.&lt;/P&gt;&lt;P&gt;As far as I understand adaptive components are placed on default points and then have to be moved via code to the corresponding position. Because I am working with gauss krüger coordinates this is quite a distance...&lt;/P&gt;&lt;P&gt;I found another thread here giving the solution of only assigning the corresponding coordinates but this does not work in Python? (e.g. point.Position = refpt)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My questions:&lt;/P&gt;&lt;P&gt;Is there a different approach of placing the adaptive family straight on the desired points?&lt;/P&gt;&lt;P&gt;Or is there a possibility to batch the movement of points? I found the method&amp;nbsp;FamilyInstanceCreationData(famsymb,iList)but could not make it run in python nor figure out whether it is only for single point families.&lt;/P&gt;&lt;P&gt;I am working with RPS, below please see my code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Any help would be greatly appreciated!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My approach is the following:&lt;/P&gt;&lt;P&gt;# place family instance, get default placement points, subtract from my desired coordinates (list) and move element&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;inst = AdaptiveComponentInstanceUtils.CreateAdaptiveComponentInstance(&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; doc, inst)&lt;/P&gt;&lt;P&gt;placePointIds = []&lt;/P&gt;&lt;P&gt;placePointIds = AdaptiveComponentInstanceUtils.GetInstancePlacementPointElementRefIds(&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; inst)&lt;/P&gt;&lt;P&gt;for ind, item in enumerate(placePointIds):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;# assign a point object to refpt, refpt is the orginal point of the family, newpt the new point derived from pt information&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; refpt = doc.GetElement(item)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; newpt = pt[ind]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; trans = newpt.Subtract(refpt.Position)&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ElementTransformUtils.MoveElement(doc, item, trans)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jan 2018 11:31:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/is-there-a-batch-method-for-placing-adaptive-component-points/m-p/7666601#M53524</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-01-05T11:31:16Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a batch method for placing adaptive component points?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/is-there-a-batch-method-for-placing-adaptive-component-points/m-p/7666771#M53525</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;there is a performance problem with ElementTransformUtils:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/revit-api-forum/elementtransformutils-performance-issue/m-p/5775624/highlight/true#M11399" target="_blank"&gt;https://forums.autodesk.com/t5/revit-api-forum/elementtransformutils-performance-issue/m-p/5775624/highlight/true#M11399&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Seems to auto regenerate after each movement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Did you see the AdaptiveComponentInstanceUtils.MoveAdaptiveComponentInstance method?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Perhaps this one does not include a regenerate, I don't know.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Revitalizer&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jan 2018 12:43:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/is-there-a-batch-method-for-placing-adaptive-component-points/m-p/7666771#M53525</guid>
      <dc:creator>Revitalizer</dc:creator>
      <dc:date>2018-01-05T12:43:39Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a batch method for placing adaptive component points?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/is-there-a-batch-method-for-placing-adaptive-component-points/m-p/7666980#M53526</link>
      <description>&lt;P&gt;the placement points are ReferencePoints. Maybe you can use :&amp;nbsp; (refpt&amp;nbsp;as ReferencePoint).SetCoordinateSystem()&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jan 2018 13:57:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/is-there-a-batch-method-for-placing-adaptive-component-points/m-p/7666980#M53526</guid>
      <dc:creator>FAIR59</dc:creator>
      <dc:date>2018-01-05T13:57:13Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a batch method for placing adaptive component points?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/is-there-a-batch-method-for-placing-adaptive-component-points/m-p/7667194#M53527</link>
      <description>&lt;P&gt;Hi guys,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Happy New Year to you!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for pointing out the old thread, Rudi.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I prompted the development team for a status update on&amp;nbsp;&lt;U&gt;&lt;STRONG&gt;REVIT-74636&lt;/STRONG&gt;&lt;/U&gt; [ElementTransformUtils performance].&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;</description>
      <pubDate>Fri, 05 Jan 2018 15:04:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/is-there-a-batch-method-for-placing-adaptive-component-points/m-p/7667194#M53527</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2018-01-05T15:04:07Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a batch method for placing adaptive component points?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/is-there-a-batch-method-for-placing-adaptive-component-points/m-p/7671329#M53528</link>
      <description>&lt;P&gt;Hey thanks a lot for all the suggestions!&lt;/P&gt;&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1103138"&gt;@Revitalizer&lt;/a&gt;: I had tried using&amp;nbsp;MoveAdaptiveComponentInstance for the first point of my adaptive component for at least moving it more to the direction of its final placement. The other points were still transformed using 'MoveElement'.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now I changed all points to be transfered via 'MoveAdaptiveComponentInstance' but now I only get the error message there are "multiple instances on one point which will be counted twice in schedules..." but no adaptive Component is created.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Even using the 'MoveAdaptiveComponentInstance' Method all points are being moved one by one, originally I was assuming whether there would be a batch/list method to move them all at once per instance?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/2083518"&gt;@FAIR59&lt;/a&gt;: What do you mean precisely with using the reference point? I tried to assign the values directly , e.g. refpt.Position = newPoint, but that does not work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below please find my code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;# create new instance of adaptive component family&lt;BR /&gt;inst = AdaptiveComponentInstanceUtils.CreateAdaptiveComponentInstance(&lt;BR /&gt;doc, famsymb)&lt;BR /&gt;placePointIds = []&lt;BR /&gt;placePointIds = AdaptiveComponentInstanceUtils.GetInstancePlacementPointElementRefIds(&lt;BR /&gt;inst)&lt;BR /&gt;for ind, item in enumerate(placePointIds):&lt;BR /&gt;## assign a point object to refpt, refpt is the orginal point of the family, newpt the new point derived from pt/LOC inf&lt;BR /&gt;refpt = doc.GetElement(item)&lt;BR /&gt;newpt = pt[ind]&lt;BR /&gt;trans = newpt.Subtract(refpt.Position)&lt;BR /&gt;print trans&lt;BR /&gt;print 'ind: ' + str(ind)&lt;/P&gt;&lt;P&gt;## if else statement for using both methods, moveInstance for first point, moveElement for following ones&lt;BR /&gt;#if ind == 0:&lt;BR /&gt;transform = Transform.CreateTranslation(trans)&lt;BR /&gt;AdaptiveComponentInstanceUtils.MoveAdaptiveComponentInstance(&lt;BR /&gt;inst, transform, 'false')&lt;BR /&gt;#else:&lt;BR /&gt;#ElementTransformUtils.MoveElement(doc, item, trans)&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jan 2018 09:00:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/is-there-a-batch-method-for-placing-adaptive-component-points/m-p/7671329#M53528</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-01-08T09:00:00Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a batch method for placing adaptive component points?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/is-there-a-batch-method-for-placing-adaptive-component-points/m-p/7671450#M53529</link>
      <description>&lt;P&gt;I mean you can use the SetCoordinateSystem&amp;nbsp;method of the referencepoint like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;				Element refpt = doc.GetElement(item);
				XYZ newpt = pt[ind];
				Transform tf = Transform.Identity;
				tf.Origin = newpt;
				(refpt as ReferencePoint).SetCoordinateSystem(tf);
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jan 2018 09:56:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/is-there-a-batch-method-for-placing-adaptive-component-points/m-p/7671450#M53529</guid>
      <dc:creator>FAIR59</dc:creator>
      <dc:date>2018-01-08T09:56:55Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a batch method for placing adaptive component points?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/is-there-a-batch-method-for-placing-adaptive-component-points/m-p/7671500#M53530</link>
      <description>&lt;P&gt;Yes ok, as far as I understand that assigns my new point directly to the reference point? But still I will have to move each point which causes the bad performance no?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jan 2018 10:21:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/is-there-a-batch-method-for-placing-adaptive-component-points/m-p/7671500#M53530</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-01-08T10:21:02Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a batch method for placing adaptive component points?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/is-there-a-batch-method-for-placing-adaptive-component-points/m-p/7671589#M53531</link>
      <description>&lt;P&gt;Yes, you have to&amp;nbsp;move every point separate. If the bad performance issue is related to the ElementTransformUtils methods, as suggested, then this method might give better performance. To know for sure, you'd have to test.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jan 2018 11:11:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/is-there-a-batch-method-for-placing-adaptive-component-points/m-p/7671589#M53531</guid>
      <dc:creator>FAIR59</dc:creator>
      <dc:date>2018-01-08T11:11:06Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a batch method for placing adaptive component points?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/is-there-a-batch-method-for-placing-adaptive-component-points/m-p/7672487#M53532</link>
      <description>&lt;P&gt;Hey awesom!!! It works! Performance is way better and the code runs fluid! I suppose this is even better than moving components alsthough I would be interested to compare both methods once it is fixed...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I read the API doc but I don't really understand what the Transform.Identity does... could you give me a hint?&lt;/P&gt;&lt;P&gt;Thanks a lot for your efforts, really saved my day &lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My code looks now like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;placePointIds = AdaptiveComponentInstanceUtils.GetInstancePlacementPointElementRefIds(&lt;BR /&gt;inst):&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;for ind, item in enumerate(placePointIds):&lt;BR /&gt;refpt = doc.GetElement(item)&lt;BR /&gt;newpt = pt[ind]&lt;BR /&gt;tf = Transform.Identity&lt;BR /&gt;tf.Origin = newpt&lt;BR /&gt;refpt.SetCoordinateSystem(tf);&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jan 2018 16:41:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/is-there-a-batch-method-for-placing-adaptive-component-points/m-p/7672487#M53532</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-01-08T16:41:14Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a batch method for placing adaptive component points?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/is-there-a-batch-method-for-placing-adaptive-component-points/m-p/8549520#M53533</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your code is for the placement the family or move the adaptive point after placement the family?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Fri, 25 Jan 2019 13:58:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/is-there-a-batch-method-for-placing-adaptive-component-points/m-p/8549520#M53533</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-01-25T13:58:44Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a batch method for placing adaptive component points?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/is-there-a-batch-method-for-placing-adaptive-component-points/m-p/8553540#M53534</link>
      <description>Hey there, by now I learnt to first place the points at default and then move the points accordingly. More efficient and quicker. Hope that helps!&lt;BR /&gt;</description>
      <pubDate>Mon, 28 Jan 2019 07:57:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/is-there-a-batch-method-for-placing-adaptive-component-points/m-p/8553540#M53534</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-01-28T07:57:20Z</dc:date>
    </item>
  </channel>
</rss>

