Subscribing to ElementTypeDuplicated Event

Subscribing to ElementTypeDuplicated Event

jagostinho74
Collaborator Collaborator
224 Views
2 Replies
Message 1 of 3

Subscribing to ElementTypeDuplicated Event

jagostinho74
Collaborator
Collaborator

Hello,

 

I was looking into if the ElementTypeDuplicated Event was capable of triggering some automatic renaming of the created Type using the element's properties. But found that the macro runs immediately after the "Duplicate" button is pressed. I am guessing that there is no way of having it working so that a renamer is run after the user presses the OK button the Type Properties window?

 

Thanks in advance

Assistant BIM/CAD Manager

Manchester, UK


225 Views
2 Replies
Replies (2)
Message 2 of 3

RPTHOMAS108
Mentor
Mentor

Not with that event since the duplication is one action and changing parameter values of it is another I suspect.

 

You could instead investigate using IUpdater with Element.GetChangeTypeParameter or use DocumentChangedEvent to queue an ExternalEvent (the first option is probably more preferable).

Message 3 of 3

jagostinho74
Collaborator
Collaborator

thank you. Will try that.

Assistant BIM/CAD Manager

Manchester, UK


0 Likes