DMU & Change added elements type problem

DMU & Change added elements type problem

IbrahimNaeem
Advocate Advocate
471 Views
1 Reply
Message 1 of 2

DMU & Change added elements type problem

IbrahimNaeem
Advocate
Advocate

Hello Gents, 

I've implemented a DMU that works fine when I use 

Doc.Delete(Elementid);

but when I want to change the family instance type using the following

MyFamilyInstance.ChangeTypeId(MyFamilySymbolId);

runs into problem but problem with not the script I'm using to change the type because I used already before with an external command and worked fine. 

 

I think the problem is : changing the type inside the DMU context. 

Any Suggestion would be highly appreciated. 

Thanks, Ibrahim Naeem  

0 Likes
472 Views
1 Reply
Reply (1)
Message 2 of 2

jeremytammik
Autodesk
Autodesk

Different actions have different priorities. 

 

Certain actions can only be performed before certain others, not after.

 

Maybe you are attempting to change the type too late in the modification chain.

 

You can influence this by setting the trigger action and DMU priority:

  

ChangePriority Enumeration

http://www.revitapidocs.com/2018/9db16841-106b-23bb-0c29-42017edcf69f.htm

 

Cheers,

 

Jeremy

 



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

0 Likes