I am having trouble with PolyCurve By Profile Family Type. I have a profile loaded into my project, I can select it with the Family Types node, but when I plug it into the PolyCurve By Profile Family Type node I get null values. The profile itself is a simple circle. Any suggestions would be greatly appreciated.
Could you check if other nodes from archi-lab works. If it works then double click “Polycurve.ProfileByFamilyType” copy the python node and paste it in your workflow. Then show what does the error says.
OK, The Get All Line Styles from archi-lab works fine as do the other nodes i have tried in the recent past.
Copied the python node over into my graph and received the below error.
Exactly the same here - the node works perfectly in 2015 but fails in 2016 - apparently there had been a change in the API. Does anybody know how to amend this?
[ObsoleteAttribute(“This property is obsolete in Revit 2015. Use Family.GetFamilySymbolIds() instead.”)]
@taurerm is right the node works in 2015 but fails in revit 2016 onwards thanks to @Einar_Raknes for pointing it out. Try the below Python script it should work for you. I tested it in Revit 2017 also it looks good.
@Konrad_K_Sobon can you please update. Thanks
Hi all - thanks a lot for the effort - I’ll try to get that running (on the road and busy…) - but so I tryed to retype the code and and it stll does not want to work for me…
from Autodesk.DesignScript.Geometry import *
Import ToDSType(bool) extension method
Import DocumentManager and TransactionManager
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
from System.Collections.Generic import *
from Autodesk.Revit.DB import *
doc = DocumentManager.Instance.CurrentDBDocument
uiapp = DocumentManager.Instance.CurrentUIApplication
app = uiapp.Application
#name = str(IN.Name)
type = UnwrapElement(IN.Family.Name)
name = UnwrapElement(IN.Name)
family = UnwrapElement(IN.Family)
famDoc = doc.EditFamily(family)
famCollector = FilteredElementColector(famdoc)
sketch = famCollector.OfClass(Sketch)
for i in sketch
cArray = list(i.profile)
cArray[:] = [[Revit.GeometryConversion.RevitToProtoCurve.ToProtoType (y, True ) for y in x] for x in cArray]
OUT = cArray
run on a profile family returns
Warning: IronPythonEvaluator.EvaluateIronPythonScript operation failed.
unexpected token ‘’
maybe i am missing something
@taurerm to make your life easier i am just dropping the DYN script here PolyCurveByProfileFamilyType_2016-17(Kulkul).dyn (3.9 KB)
Great - many thanks!!!
+31 6 34489403
FYI, i got a null value.
using 2016, Dynamo 22.214.171.12483
PolyCurveByProfileFamilyType_2016-17(Kulkul).dyn (3.9 KB)
Oh man, I wish I could invite others to make edits to my packages. It would be so much easier. I get a few of these every now and then, and usually don’t update until I am actually in need of it. That’s a sad thing to say, but that’s how this usually works with my other commitments and limited time available.
I will put this on a TODO list. Thanks!
You only need to create your profile in a profile family environment and it will work perfect
@Kulkul thanks for the code.
i know this is an old topic, but still have a problem… when your profile has multiple types or is parametric then it won’t take the correct profile…it just looks into the family what it you see when you open the family is what it takes. So setting types or adjusting a parameter and then want to extract the lines won’t work