Getting an entity's schema?

Getting an entity's schema?

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

Getting an entity's schema?

Anonymous
Not applicable

Hi,

I am currently trying to unload and remove a linked type, I can unload it but I wish to use the "DeleteEntity()" method in the RevitLinkType. 

Doing this I relized I needed a shema to pass into the method. I have no idea how to get the schema of the entity. I can get the Guids but this is a new topic to me and am difficulty finding help online.

 

here is the code i am using, 

 

Thank you in advance.

Jack  

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

Anonymous
Not applicable

MyCode.PNG

0 Likes
Message 3 of 4

arnostlobel
Alumni
Alumni
Accepted solution

Hello Jack,

 

the DeleteEntity is not the method you can use in this case. It is for removing elements of external storage only. That is why you need to pass in the schema to which the storage element belongs. (I admit it should be explained better in the RevitAPI help.)

 

I suppose you could use the DeleteElement() method if you want to remove the link type for good from the host element.

 

Arnošt Löbel
Message 4 of 4

Anonymous
Not applicable

Thanks a million, this is very helpful. 🙂

0 Likes