Message 1 of 4

Not applicable
04-23-2021
07:00 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello. I want to insert line based family into project. But there is exeption "This method is only applicable for detail families". I used "Generic Model line based.rft" for created family. What is the problem?
MyFamilySymbols = FilteredElementCollector(doc).OfClass(FamilySymbol).ToElements()
FamSymbol = 0
for famS in MyFamilySymbols:
if famS.FamilyName == CableFamilyName:
FamSymbol = famS
break
TransactionManager.Instance.EnsureInTransaction(doc)
XYZforFam=XYZ(0,0,0)
XYZforFam2=XYZ(1000,1000,0)
newLine = Line.CreateBound(XYZforFam,XYZforFam2)
newobj = doc.Create.NewFamilyInstance(newLine, FamSymbol, doc.ActiveView)
TransactionManager.Instance.TransactionTaskDone()
Solved! Go to Solution.