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: 

Keeping line/wall end point attched to referenced line/wall.

5 REPLIES 5
Reply
Message 1 of 6
halukuzuner
318 Views, 5 Replies

Keeping line/wall end point attched to referenced line/wall.

Hi.

As shown in picture below, one end of line/wall is attached to horizontal one.

When sloped line/wall is moved, bottom end of line/or wall keeps on horizontal one and other end moves according to moving direction. In which way Revit knows whether bottom end of sloped one is on sloped wall/line and how it always keep them contacted?

Image 144.png

5 REPLIES 5
Message 2 of 6
RyanCameron
in reply to: halukuzuner

It depends.

It depends on how it got connected. (or did you mean contacted?) Do you have them locked together?

ezgif-2-171187a452.gif

 

RB Cameron, AIA, LEED AP, EDAC
Digital Practice Leader

Message 3 of 6
halukuzuner
in reply to: RyanCameron

I don't want to align wall or line to each other. I wonder how one end of sloped line always keeps on horizontal line. I couldn't find any property in Revit API.

 

Message 4 of 6
RPTHOMAS108
in reply to: halukuzuner

For CurveElements there is CurveElement.SetGeometryCurve which allows you to override joins via the boolean.

 

For Walls there is WallUtils for allowing or disallowing joins at ends of walls. However disallowing joins is the same as doing so in the UI and likely would not be used for what you showed in your original. Doing so would create an unclean interface at the junction of the two walls. There is generally other better reasons for using disallow joins.

 

Beyond those two things Revit has inherent behaviour that tries to create realistic relationships between real world building elements. It isn't CAD i.e. pure geometry with no inherent relationship assumed between such. So you have to kind of anticipate that it is going to try and create those relationships between things as you place them (via API or UI).

See also LocationCurve.ElementsAtJoin

Message 5 of 6
halukuzuner
in reply to: halukuzuner

Thanks RPTHOMAS108,

I found that properties. But I don't know how to use it. Do you have any code that uses that property? I want to create flowchart representing object used in Revit model using detail lines. As shown in picture below

 

Image 146.png

 

hvac-example-1.png

Message 6 of 6
RPTHOMAS108
in reply to: halukuzuner

I believe detail lines will end up joined regardless.

 

If you want to adjust an existing CurveElement then you can use 

 

CurveElement.SetGeometryCurve(Curve,true)

 

That should prevent the existing joined elements being dragged with the change made by Curve.

 

I would probably be looking at line based detail items for that kind of diagram, although you may end up with similar issues.

 

You do get issues when creating a lot of line elements in one go. When drawing a polygon for example if you draw the sides in an anticlockwise order and direction then it usually works out ok. Sometimes however if you draw them some other way then it can create a mess by trying to extend ends to meet (beyond where they currently meet). So if you try ordering parts of your diagram into curveloops first (where order and direction is enforced) then that may help.

 

i.e. use:

NewModelCurveArray instead of NewModelCurve and

NewDetailCurveArray instead of NewDetailCurve

 

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

Post to forums  

Autodesk Design & Make Report