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
286 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  

Rail Community


Autodesk Design & Make Report