AutoCad Block to Revit family - get block rotation

Alright, so I think I got it! This python script should return:

  • if the operation was successful
  • scale
  • rotation
  • translation

image

# Load the Python Standard and DesignScript Libraries
import sys
import clr
clr.AddReference('System.Numerics')
from System.Numerics import *


v = IN[0]

matrix = Matrix4x4(v[0],v[1],v[2],v[3],v[4],v[5],v[6],v[7],v[8],v[9],v[10],v[11],v[12],v[13],v[14],v[15])


val = Matrix4x4.Decompose(matrix)

OUT = val
3 Likes