Get Wall Location Line (from joined wall)

Get Wall Location Line (from joined wall)

desdinova
Advocate Advocate
4,272 Views
4 Replies
Message 1 of 5

Get Wall Location Line (from joined wall)

desdinova
Advocate
Advocate
 public Line GetWallLocation(Document doc, Wall wall)
        {
            Line line = null;

            LocationCurve locationCurve = wall.Location as LocationCurve;
            Curve curve = locationCurve.Curve;

            line = curve as Line;

            using (Transaction t = new Transaction(doc, "Create"))
            {
                t.Start();
                DetailCurve dc = doc.Create.NewDetailCurve(doc.ActiveView, line);
                t.Commit();
            }

            return line;
        }

 

2017-01-30_15-59-24.jpg

Hello friends,

I want to get location lines like in second picture.

How can i do that ?

Thanks in advance...

 

Accepted solutions (1)
4,273 Views
4 Replies
Replies (4)
Message 2 of 5

jeremytammik
Autodesk
Autodesk

Dear Desdinova,

 

I don't understand your question.

 

What does 'get these lines' exactly mean?

 

The code that you show might do just what you are asking, depending on how you use it and what you mean by that.

 

Is there more to it than I currently see?

 

Cheers,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 3 of 5

desdinova
Advocate
Advocate

Dear Jeremy

I want to get the line in second picture.

The location curve returns line in first picture

.2017-01-30_15-59-24.jpg

0 Likes
Message 4 of 5

jeremytammik
Autodesk
Autodesk
Accepted solution

In the case you show, you can subtract a vector from the end of the line, presumably with a length half the neighbouring wall width.



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 5 of 5

desdinova
Advocate
Advocate

Thank you 

I never thought it would be that easy...

0 Likes