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: 

Get element of variant or get the variant of an element

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
Anonymous
550 Views, 4 Replies

Get element of variant or get the variant of an element

Hello !

 

First of all, i don't know if the word 'variant' is the good translation from "Variante" in French.

So, if it's not clear for you, i'll try to clarifie it.

 

 

I would like to get the property "variant" of a element, or get all element of one variant.

 

I made somes search but i didn't find anything...

 

Can you help me ?

 

Regards,

Maxence

4 REPLIES 4
Message 2 of 5
naveen.kumar.t
in reply to: Anonymous

Hi @Anonymous,

 

Could you please explain what is "Variant"?


Naveen Kumar T
Developer Technical Services
Autodesk Developer Network

Message 3 of 5
Anonymous
in reply to: naveen.kumar.t

Hi,

 

After have make more research, i figured out it's "design option" in english version.

So i found this :

 

 

ElementId activeOptId = Autodesk.Revit.DB.DesignOption.GetActiveDesignOptionId(m_doc);
            ElementDesignOptionFilter filter = new ElementDesignOptionFilter(activeOptId);
            //

            FilteredElementCollector collector = new FilteredElementCollector(m_doc);
            IList<Element> m_elementsToProcess = collector.WherePasses(filter).WhereElementIsNotElementType().ToElements();

 

 

So now i'm looking to get the "design option" of an element when I don't use this filtre,

 

Regards,

Maxence

Message 4 of 5
Anonymous
in reply to: Anonymous

Hello,

 

I figured out this last point by myself..

 

For anyone who would like to know 

 

-> just use 

Element e;
e.DesignOption

Regards

Message 5 of 5
patrick.emin
in reply to: Anonymous

Bonjour, pour votre information, nous avons un forum en français: https://forums.autodesk.com/t5/revit-et-bim-francais/bd-p/198


Patrick Emin animateur de la communauté francophone


Vous avez trouvé un message utile? Alors donnez un "J'aime" à ce message!
Votre question a eu une réponse satisfaisante? Voulez vous avoir l'amabilité de cliquer sur le bouton
 APPROUVER LA SOLUTION  en bas de la réponse qui apporte une solution?
Signez notre Livre d'Or

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

Post to forums  

Autodesk Customer Advisory Groups


Rail Community