Community
Vault Customization
Share your knowledge, ask questions, and explore popular Vault API, Data Standard, and VBA topics related to programming, creating add-ins, or working with the Vault API.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

converting VDF IEntity to WebService.File object

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
KarlR.J.Wehr
615 Views, 2 Replies

converting VDF IEntity to WebService.File object

I try to convert a VDF.IEntity containing a File to a legacy File object. As documented in the wiki help only a simple cast is needed.
I tried the following:


VDF.Vault.Currency.Entities.IEntity ent = ...
Autodesk.Connectivity.WebServices.File file = (Autodesk.Connectivity.WebServices.File)ent;


Doing so I'm getting an InvalidCastException, what is wrong?

2 REPLIES 2
Message 2 of 3
KarlR.J.Wehr
in reply to: KarlR.J.Wehr

just found out the solution, I have to cast this way:

 

Autodesk.Connectivity.WebServices.File file=

 (Autodesk.Connectivity.WebServices.File)(VDF.Vault.Currency.Entities.FileIteration)ent;

Message 3 of 3
raghulan
in reply to: KarlR.J.Wehr

 how to convert 

File to IEntity.

 

Regards,

Raghulan Gowthaman Cert IV TAA, B.E,.
Senior Technical Consultant | Developer - R&D
A2K Technologies Sydney
Web : www.a2ktechnologies.com.au
www.civil3dforum.com | www.e4forums.com
www.zcodia.com.au
www.raghulangowthaman.com

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report