Trouble with PolyCurve By Profile Family Type

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.

Thanks
Ben

Hi @BenDoty_LMN

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?

From http://www.revitapidocs.com/2015/1b4854ee-6afc-acfb-3d71-3c7eb946bb57.htm

[ObsoleteAttribute(“This property is obsolete in Revit 2015. Use Family.GetFamilySymbolIds() instead.”)]

1 Like

Hi @BenDoty_LMN

@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 :slight_smile:

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…
import clr
clr.AddReference(‘ProtoGeometry’)
from Autodesk.DesignScript.Geometry import *

Import ToDSType(bool) extension method

clr.AddReference(“RevitNodes”)
import Revit
clr.ImportExtensions(Revit.Elements)

Import DocumentManager and TransactionManager

clr.AddReference(“RevitServices”)
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

from System.Collections.Generic import *

Import RevitAPI

clr.AddReference(“RevitAPI”)
import Autodesk
from Autodesk.Revit.DB import *

doc = DocumentManager.Instance.CurrentDBDocument
uiapp = DocumentManager.Instance.CurrentUIApplication
app = uiapp.Application

#name = str(IN[0].Name)
type = UnwrapElement(IN[0].Family.Name)
name = UnwrapElement(IN[0].Name)

family = UnwrapElement(IN[0].Family)

TransactionManager.Instance.ForceCloseTransaction()
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

Hi Martin

@taurerm to make your life easier i am just dropping the DYN script here PolyCurveByProfileFamilyType_2016-17(Kulkul).dyn (3.9 KB)

2 Likes

Great - many thanks!!!
Martin
Martin Taurer
www.livingroomcraftz.com
+31 6 34489403

FYI, i got a null value.

using 2016, Dynamo 1.2.1.3083

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!

1 Like

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

Thanks a lot Ryan

i am facing same issue, while changing the type parameter of profile family and based on that want to extract the polycurve, but facing an issue like initial whatever value was there it got same thing extracted.
is there any solution for this? @Kulkul and @Konrad_K_Sobon