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: 

Railing Path

7 REPLIES 7
Reply
Message 1 of 8
Anonymous
885 Views, 7 Replies

Railing Path

Anonymous
Not applicable

Hi, 

 

I'm wondering if Revit API allows edit the path of existing railing elements.

Please let me know if there's any way to implement this or any workaround.

Thank you for your help in advance.

 

Jinsol

0 Likes

Railing Path

Hi, 

 

I'm wondering if Revit API allows edit the path of existing railing elements.

Please let me know if there's any way to implement this or any workaround.

Thank you for your help in advance.

 

Jinsol

7 REPLIES 7
Message 2 of 8
Aaron.Lu
in reply to: Anonymous

Aaron.Lu
Autodesk
Autodesk
Dear Jinsol, As far as I know, there is no such API.


Aaron Lu
Developer Technical Services
Autodesk Developer Network
0 Likes

Dear Jinsol, As far as I know, there is no such API.


Aaron Lu
Developer Technical Services
Autodesk Developer Network
Message 3 of 8
Dale.Bartlett
in reply to: Aaron.Lu

Dale.Bartlett
Collaborator
Collaborator

Put aside accessing an existing railing path, is it possible to create railings (ie new path) via the api?




______________
Yes, I'm Satoshi.
0 Likes

Put aside accessing an existing railing path, is it possible to create railings (ie new path) via the api?




______________
Yes, I'm Satoshi.
Message 4 of 8
Anonymous
in reply to: Anonymous

Anonymous
Not applicable

Can we have mouse events in Revit APIs. I want to create addins which allows me to draw line using mouse. 

So I want to use mouse events . I am new in Revit so please guide me that is there any mouse events in Revit Api or not

 

0 Likes

Can we have mouse events in Revit APIs. I want to create addins which allows me to draw line using mouse. 

So I want to use mouse events . I am new in Revit so please guide me that is there any mouse events in Revit Api or not

 

Message 5 of 8

Dale.Bartlett
Collaborator
Collaborator

Ok, lazy me...

Help file:

private void CreateRailing(Document document, Stairs stairs)
{
    Transaction trans = new Transaction(document, "Create Railings");
    trans.Start();

    // Delete existing railings
    ICollection<ElementId> railingIds = stairs.GetAssociatedRailings();
    foreach (ElementId railingId in railingIds)
    {
        document.Delete(railingId);
    }
    // Find RailingType
    FilteredElementCollector collector = new FilteredElementCollector(document);
    ICollection<ElementId> RailingTypeIds = collector.OfClass(typeof(RailingType)).ToElementIds();
    Railing.Create(document, stairs.Id, RailingTypeIds.First(), RailingPlacementPosition.Treads);
    trans.Commit();
}

I just need to confirm that I can create standalone in the absence of stairs. Dale

 




______________
Yes, I'm Satoshi.
0 Likes

Ok, lazy me...

Help file:

private void CreateRailing(Document document, Stairs stairs)
{
    Transaction trans = new Transaction(document, "Create Railings");
    trans.Start();

    // Delete existing railings
    ICollection<ElementId> railingIds = stairs.GetAssociatedRailings();
    foreach (ElementId railingId in railingIds)
    {
        document.Delete(railingId);
    }
    // Find RailingType
    FilteredElementCollector collector = new FilteredElementCollector(document);
    ICollection<ElementId> RailingTypeIds = collector.OfClass(typeof(RailingType)).ToElementIds();
    Railing.Create(document, stairs.Id, RailingTypeIds.First(), RailingPlacementPosition.Treads);
    trans.Commit();
}

I just need to confirm that I can create standalone in the absence of stairs. Dale

 




______________
Yes, I'm Satoshi.
Message 6 of 8

Dale.Bartlett
Collaborator
Collaborator

Ok, it appears that Railings require an existing Stair.

 Create
Automatically creates new railings with the specified railing type on all sides of a stairs element.

Is there a suggested workaround? Invisible stairs? Dale




______________
Yes, I'm Satoshi.
0 Likes

Ok, it appears that Railings require an existing Stair.

 Create
Automatically creates new railings with the specified railing type on all sides of a stairs element.

Is there a suggested workaround? Invisible stairs? Dale




______________
Yes, I'm Satoshi.
Message 7 of 8
Dale.Bartlett
in reply to: Anonymous

Dale.Bartlett
Collaborator
Collaborator
Sorry Mouse Events should be a new topic.



______________
Yes, I'm Satoshi.
0 Likes

Sorry Mouse Events should be a new topic.



______________
Yes, I'm Satoshi.
Message 8 of 8

Dale.Bartlett
Collaborator
Collaborator

bump

 

To summarise, is it possible to create railings via API without exisiting stairs (ie free-standing)? My research says no. Thanks, Dale




______________
Yes, I'm Satoshi.
0 Likes

bump

 

To summarise, is it possible to create railings via API without exisiting stairs (ie free-standing)? My research says no. Thanks, Dale




______________
Yes, I'm Satoshi.

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

Post to forums  

Autodesk Design & Make Report