How to Catch trigger in Updater for "Insulation Thickness" of Pipe.

How to Catch trigger in Updater for "Insulation Thickness" of Pipe.

nitinjambhale
Advocate Advocate
634 Views
2 Replies
Message 1 of 3

How to Catch trigger in Updater for "Insulation Thickness" of Pipe.

nitinjambhale
Advocate
Advocate

Hello EveryOne,

I m drawing Pipe and changing its Insulation Thickness. in Revit MEP 2014 API.

 

 -------- Added Trigger -------

Autodesk.Revit.DB.UpdaterRegistry.AddTrigger(this.GetUpdaterId(), filter, Autodesk.Revit.DB.Element.GetChangeTypeParameter(new Autodesk.Revit.DB.ElementId(BuiltInParameter.RBS_PIPE_INSULATION_THICKNESS)));
Autodesk.Revit.DB.UpdaterRegistry.AddTrigger(this.GetUpdaterId(), filter, Autodesk.Revit.DB.Element.GetChangeTypeParameter(new Autodesk.Revit.DB.ElementId(BuiltInParameter.RBS_REFERENCE_INSULATION_THICKNESS)));

 

----- Catching Change ---- 

(data.IsChangeTriggered(id, Autodesk.Revit.DB.Element.GetChangeTypeParameter(new Autodesk.Revit.DB.ElementId(BuiltInParameter.RBS_PIPE_INSULATION_THICKNESS)))) ||
(data.IsChangeTriggered(id, Autodesk.Revit.DB.Element.GetChangeTypeParameter(new Autodesk.Revit.DB.ElementId(BuiltInParameter.RBS_REFERENCE_INSULATION_THICKNESS)))) ||

 

 

But when i change insulation thickness then above data.IsChangeTriggered(...) returning 'false' value instead of 'true'

Please advise something.

 

Regards,

Nitin.

 

 

0 Likes
635 Views
2 Replies
Replies (2)
Message 2 of 3

ollikat
Collaborator
Collaborator

Hi

unfortunatelly I don't probably have any good suggestions for this. But have to say that I haven't never used this overload of GetChangeTypeParameter() method, which takes Element id. The API documentation says: "ElementId of parameter for the ChangeType to trigger on." which is very confusing because Parameter class doesn't inherite from element. I don't trust that method at all. Do you have possibility to try the another overload?

Hopefully (but probably not) this helps.

0 Likes
Message 3 of 3

nitinjambhale
Advocate
Advocate

I Cant use other overload because my filter is for Insulation Thickness only and it is a parameter.

And the other thing is Trigger for Diameter changes is working but not for Insulation Thickness.

 

I m still wondering may be it is API thing or so. (Without Blaming).

 

Thanx though.

 

Regards,

Nitin.

 

0 Likes