Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

AssemblyInstance Create permitted for membership

1 REPLY 1
Reply
Message 1 of 2
dorer69044
241 Views, 1 Reply

AssemblyInstance Create permitted for membership

Hi all, 

I'm trying to create an Assembly using the following method:

public static AssemblyInstance Create(Document document, ICollection<ElementId> assemblyMemberIds, ElementId namingCategoryId)


And I got the following error message:
Autodesk.Revit.Exceptions.ArgumentException: 'One or more element ids was not permitted for membership in the assembly instance. Elements should be of a valid category and should not be a member of an existing assembly.
Parameter name: assemblyMemberIds'

Is there any way to find from the list of elements that are not allowed to be added to the assembly?
For example, I have 3 elements and I want to find out which of them cannot be added to the assembly.

Thanks 🙂

1 REPLY 1
Message 2 of 2

Hi @dorer69044,

You could try to use AreElementsValidForAssembly Method to get the same:
https://www.revitapidocs.com/2023/b86d920d-dd9e-db71-c650-cdfbf623942d.htm


  Moturi George,     Developer Advocacy and Support,  ADN Open

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Forma Design Contest


Rail Community