All the best for 2019! Maybe my brain is still switched off, hence my question to the forum;
I have a Adaptive Component Family which has a series of reference points. I would like to select certain points for further use with Dynamo.
Is there a way of listing the reference points within the adaptive component family instance?
you can use AdaptiveComponent.Locations to get the locations of your reference points, but I don’t know if it’s what you are looking for.
Thank you for your response. I have tried AdaptiveComponent.Locations but it only returns the adaptive placement points and not the reference points. I need a list of the reference points within the adaptive family.
Ok then try this python script, it uses this method from the RevitAPI
edit: this should work for both lists and single elements
from Autodesk.Revit.DB import *
from Autodesk.Revit.DB.Structure import *
from Autodesk.Revit.UI import *
from System.Collections.Generic import List
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument
element = UnwrapElement(IN)
element = [UnwrapElement(IN)]
list = 
for x in element:
points = AdaptiveComponentInstanceUtils.GetInstancePlacementPointElementRefIds(x)
OUT = list
Thank you for the script! I have tried it but it returns the values for the adaptive placement points only? Same result as AdaptiveComponent.Locations (refer to screenshot)
I have tried adjusting the script to use GetInstancePointElementRefIds but it returns the same values for the placement points?
There are 3 types of points:
- Placement Points
- Reference Points
- Shape Handle Points
and 3 available methods in the API
- GetInstancePlacementPointElementRefIds -> Placement Points
- GetInstancePointRefIds -> Placement + ShapeHandle Points
- GetInstanceShapeHandlePointElementRefIds -> ShapeHandle Points
Thank you very much for this! I will adjust accordingly and keep you posted!
Yet again thanks!!
Attached is my adaptive component family, will you test on your side please? For me, the only points listed is the placement points, although the family does contain both placement and reference points.
You are right, I made a mistake in my previous post and I will correct it now: the second method gives you Placement + ShapeHandle points.
I haven’t found so far a method in the API to get the reference points from a project environment, but if you are working in the family environment it is possible:
What do you want to do once you get the points? Maybe there is a workaround.
@stefan.oberholzer Use Element.Geometry , filter out the Points and then figure out a way to obtain the desired points (three lowest ones from each sublist, maybe)
Thank you for your effort and assistance!
I want to use the reference points for creating curves for referencing other elements to. For now, I have identified the individual curves’ midpoints and created a point list.
It would be cool if the API can expose reference points in AC families at some point in the future.
This works for exposing the points!
Thank you @lucamanzoni and @Vikram_Subbaiah for your help, much appreciated!
Forgot to mention, I had to use Autodesk.Point to filter the points, and not only Point