Assembly: modify origin (Part 2)

This is the result i’m looking for …

picture%203

The views are aligned with the element, even if the (highlighted) stair is not aligned by the X or Y-axis (45 degrees rotation). I created this result by manualy rotate the Assembly Origin in Revit.

Hi I don’t have some of the nodes you’re using (btw which packages are they from?)
But the problem is here:


You’re using the z axis at the origin so that’s why the assembly rotates around the origin(0,0,0).
You have to rotate each assembly around it’s own center

Hi Viktor,

Thanks a lot for your response.
Can you give me a hint on how you would solve this ?

  • Create a virtual/dynamo axis at the assemblycenter, and feed that as input to the Python script.
  • Or edit the Python script itself, so it won’t need input of an axis.

Any help is much appreciated.

PS. Sorry i forgot about the custom nodes (i wil post a list shortly).

Kind regards,
Mark

This is the list of the custom nodes i used (please correct me if i missed one).

  • Element.Type = Archi-lab_Grimshaw (can be replaced by Element.ElementType).
  • Element.RotationAngle = BIM4Struc.Productivity
  • Passthrough = Clockwork
  • Tool.CreateAssembly = Steamnodes
  • Tool.RenameAssembly = Steamnodes
  • Tool.AssemblyViews = Steamnodes

I took a look at the script and it’s possible that it’s not the rotation axis, but rather the way the views for the assemblies are created. The method in the API doesn’t seem to have any control of where exactly to place the the section lines and thus the crop region includes much more than the stair. I don’t have time to go into further detail with this, but you may consider creating the views without assemblies.
I might not be right though. I hope someone else has more info about it.

No problem, thanks for your time, and effort to help me :thumbsup:

Yes i hope so too. I still have the feeling it’s possible, because when i rotate the Assembly Origin manualy it works fine.

Kind regards,
Mark

Hi I was playing with the assemblies recently and I think creating the views using the Assembly build-in functionality is better. I am talking about this.
image
And here is the Dynamo node for this.


You can find the node in Steam Nodes package. You are able also to create the assemblies inside Dynamo with Tool.CreateAssembly node and to automate the whole process. I’ve done something like that to create assemble views for curtain walls.

Hi Petar,

Thanks for your reply
That is also the node (Tools.AssemblyViews) i use in my script.
My script is divided in the steps below.

  • Create Assemblies (Tool.CreateAssembly).
  • Rename the created Assemblies (Tool.RenameAssembly).
  • Then i use the Python script to rotate the origin of the Assemblies, to get the views aligned to our elements.
  • Last step is the actual creation of the views with the node you mentioned (Tool.AssemblyViews).

All these steps seem to work fine, only the views don’t seem to relate to the assembly anymore (see picture 2 of my original post).

Kind regards,
Mark

I guess that I am missing something. What is the sequence in your script? Because what I’ve done is first to create the assemblies then to rotate them and after the rotation I create the views and everything is fine.

Do you have an example you can share, i would be very interesested :slightly_smiling_face:

Of course, hope this helps.

and the result

I know it is different but the logic should be the same. Here I needed always to have front view showing correctly no matter the orientation of the wall.

What is the version of your Dynamo installation.

1.3
image

Strange it’s the same version as mine, but i don’t seem to have the “RotateAssembly” node (is it a custom node)

This node is the same that you are using. I just wrapped it in a custom node to use the @level functionality. It is still the same python code that you are using.


Okay thanks a lot for now, i have to leave now, but wil continue tomorow :thumbsup:

Ok, good luck!

I’ve done a lot of testing, and have the feeling i have to give up :cry:

Assembly Views are placed on the faces of the “Assembly BoundingBox” (see picture above). So the only thing i can think of is that the size of the “Assembly BoundingBox” is (heavily) affected by rotating the Assembly Origin. If that’s the case it would be far beyond my knowledge. On the other hand that makes no sense, because @Petar_Penchev1 is doing the same thing, and it works fine for him.

I use only elevation views, though. I did’t place any sections but still this won’t be a big problem. Here is a very good example of creating views for elements using sections - https://revitbeyondbim.wordpress.com/2017/02/10/element-view-generation-in-revit-with-dynamo-revised/

3 Likes

A more detailed discussion of the Python script (and the solution of the above topic), can be found here.
https://forum.dynamobim.com/t/first-attempt-editing-a-python-script/19156?u=mjb-online

Kind regards,
Mark