Pipe Origin issues for Revit 2019

Pipe Origin issues for Revit 2019

Anonymous
Not applicable
1,133 Views
3 Replies
Message 1 of 4

Pipe Origin issues for Revit 2019

Anonymous
Not applicable

1.Create a pipe manually。API:(Pipe.location.curve as line).origin is right.

2.Drag the origin in the opposite direction, but the origin value remains unchanged. I get the value by Revit-Lookup plug-in.Rotation origin,the origin value changed,but the value is wrong.

Can someone help me figure out why.thanks!

 

0 Likes
Accepted solutions (1)
1,134 Views
3 Replies
Replies (3)
Message 2 of 4

Revitalizer
Advisor
Advisor
Accepted solution

Hi,

 

I don't consider it being a bug.

It just reflects the definition of a "Line":

 

https://forums.autodesk.com/t5/revit-api-forum/line-based-family-location-don-t-update-origin-after-...

 

 

Revitalizer




Rudolf Honke
Software Developer
Mensch und Maschine





0 Likes
Message 3 of 4

Anonymous
Not applicable

OK, you're right. 

But why not fix it. It's easy for you. Because it is easy to confuse people and is inconsistent with people's habitual perception。The same as when I write the code like this:

Parameter DN = pipe.get_Parameter(BuiltInParameter.RBS_PIPE_DIAMETER_PARAM);
Parameter DN2 = pipeNew.get_Parameter(BuiltInParameter.RBS_PIPE_DIAMETER_PARAM);

DN2 = DN ;

I think It should be work well,but it dosn't. I must write: DN2.SetValueString(DN.AsValueString()). API unfriendly.

0 Likes
Message 4 of 4

Revitalizer
Advisor
Advisor

Hi

 

I think in fact you should write

 

DN2.Set(DN.AsDouble()) to avoid rounding errors.

 

I myself think that one enters the world of pain when using Revit API.

Because all the inconsistencies, because of old problems never solved.

 

But I think that it is not that difficult to understand what is an object and what is just a property of an object.

 

Intuitively, we say "parameter" but we mean a parameter's value.

"Parameter is not in limit."

The problem is the ambiguity of language.

 

 

Revitalizer




Rudolf Honke
Software Developer
Mensch und Maschine





0 Likes