Results 1 to 6 of 6

Thread: aide pour fonction sur des murs

  1. #1
    Login to Give a bone
    0

    Default aide pour fonction sur des murs

    Bonjour,

    Actuellement je développe une fonction où je sélectionne un mur avec la méthode PickObject.
    Ensuite je n'arrive pas a changer ce mur en curtain wall.
    Et enfin je voudrais dessiner une ligne (ou un meneau, dsl je ne suis pas architecte) suplémentaire sur le curtain wall.

    J'ai vraiment besoin d'aide, car je n'arrive pas a développer cette partie et sa me bloque pour la suite

  2. #2
    Modérateur Forum Français Pierre-Nelson NAVARRA's Avatar
    Join Date
    2007-10
    Location
    Nantes (France)
    Posts
    531
    Login to Give a bone
    0

    Default Re: aide pour fonction sur des murs

    Salut!

    Regarde si ça peut t'aider....
    Tu peux me montrer ton code aussi si tu veux.

    http://thebuildingcoder.typepad.com/...ment-type.html

  3. #3
    Login to Give a bone
    0

    Default Re: aide pour fonction sur des murs

    Désolé pour le retard, je pensais que le forum envoyé un mail une fois que l'on a une réponse.
    Voila mon code mais après avoir selectionner mon mur, je ne sait pas quoi faire:

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;

    using Autodesk.Revit.DB;
    using Autodesk.Revit.DB.Architecture;
    using Autodesk.Revit.UI;
    using Autodesk.Revit.UI.Selection;
    using Autodesk.Revit.ApplicationServices;
    using Autodesk.Revit.Attributes;
    namespace test2011
    {
    [TransactionAttribute(TransactionMode.Manual)]
    [RegenerationAttribute(RegenerationOption.Manual)]

    public class Class1 : IExternalCommand
    {
    public class MySelectionFilter : ISelectionFilter
    {
    public bool AllowElement(Element element)
    {
    return element is Wall;
    }
    public bool AllowReference(Reference refer, XYZ point)
    {
    return refer.GeometryObject != null && refer.GeometryObject is Face;
    }
    }


    public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
    {
    //Get application and document objects
    UIDocument uidoc = commandData.Application.ActiveUIDocument;
    try
    {
    while (true)
    {
    //Pick a Wall
    Reference selRef = uidoc.Selection.PickObject(ObjectType.Element, new MySelectionFilter(), "select a room");
    Element elem = selRef.Element;
    Document doc = commandData.Application.ActiveUIDocument.Document;
    /*
    * Add code here
    */
    }

    }
    catch (Autodesk.Revit.Exceptions.OperationCanceledException) { }
    //return code
    return Result.Succeeded;
    }
    }
    }

    Encore merci

  4. #4
    Modérateur Forum Français Benoit D's Avatar
    Join Date
    2006-11
    Location
    Lille, France
    Posts
    2,149
    Login to Give a bone
    0

    Default Re: aide pour fonction sur des murs

    Quote Originally Posted by yassineboukhabza276887 View Post
    Désolé pour le retard, je pensais que le forum envoyé un mail une fois que l'on a une réponse.
    Pour cela il faut s'abonner à la discussion !
    Attached Images Attached Images

  5. #5
    Login to Give a bone
    0

    Default Re: aide pour fonction sur des murs

    toujours pas de réponse??? Je m'attendais a de l'avancement ou de l'aide

  6. #6
    Modérateur Forum Français Pierre-Nelson NAVARRA's Avatar
    Join Date
    2007-10
    Location
    Nantes (France)
    Posts
    531
    Login to Give a bone
    0

    Default Re: aide pour fonction sur des murs

    T'es toujours bloqué mec?
    Voici un bout que j'ai testé....


    SelElementSet m_selection = m_application.ActiveDocument.Selection.Elements;

    if (0 == m_selection.Size)
    {
    MessageBox.Show("Vous devez sélectionner un élément", "rvtAPI_ImageReload");
    return;
    }

    if (1 < m_selection.Size)
    {
    MessageBox.Show("Vous ne devez sélectionner qu'un seul élément", "rvtAPI_ImageReload");
    return;
    }

    // Find all wall types and their system families (or kinds)
    WallType newWallType = null;
    foreach (WallType wt in m_doc.WallTypes)
    {
    string str = wt.Name;


    if (str.Contains("panneau"))
    {
    newWallType = wt;
    continue;
    }

    }

    m_application.ActiveDocument.BeginTransaction();

    foreach (Autodesk.Revit.Element elem in m_selection)
    {
    Wall wall = elem as Wall;
    WallType oldWallType = wall.WallType;
    // change wall type and report the old/new values
    wall.WallType = newWallType;
    }

    m_application.ActiveDocument.EndTransaction();
    Last edited by Pierre-Nelson NAVARRA; 2011-09-02 at 02:01 PM.

Similar Threads

  1. Aide pour projet de modelisation, de mise à l'echelle pour futur impression 3D
    By cedric.chenmantsuan437335 in forum 3ds Max - General
    Replies: 0
    Last Post: 2013-11-02, 01:01 PM
  2. aide pour mur ossature bois
    By acor in forum Revit Architecture - Families
    Replies: 19
    Last Post: 2012-02-16, 11:37 AM
  3. Une aide SVP (pour rendu)
    By dume.susini in forum Revit Architecture - Families
    Replies: 1
    Last Post: 2010-10-06, 02:15 PM
  4. Besoin d'aide pour la topographie
    By sittingbull86 in forum Revit Architecture - General
    Replies: 17
    Last Post: 2009-12-22, 07:02 PM
  5. Aide pour création nouvelle pièce
    By sittingbull86 in forum Revit Architecture - General
    Replies: 6
    Last Post: 2008-01-14, 09:02 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •