Get keynoteTable file location

ashleyB5APU
Explorer
Explorer

Get keynoteTable file location

ashleyB5APU
Explorer
Explorer

Hi,

 

I'm struggling with a seemingly simple problem. In python, using the Revit API, I need to get the keynote table file path. 

 

I've tried using KeynoteTable.GetKeynoteTable(Document).GetExternalResourceReferences() which returns a dictionary. I can't however get the ExternalResourceReference objects, to access the property called InSessionPath. Is there a better way to do this?

 

Anyone delt with this issue before?

0 Likes
Reply
Accepted solutions (1)
215 Views
2 Replies
Replies (2)

GaryOrrMBI
Collaborator
Collaborator
Accepted solution
The clues were there in the other thread that you posted in (via the post that was linked from that)... but it was messy to decipher so...
If just getting the path to the Keynote file is actually what you're after then try:
[yourkeynotetable].GetExternalFileReference
this will return an ExternalFileReference
from that you can use:
[extfileref].GetPath and/or [extfileref].GetAbsolutePath depending on your needs.
those methods will return a ModelPath element
then you use ModelPathUtils.ConvertModelPathToUserVisiblePath([your returned model path here]) to convert the ModelPath element into a user readable string as/if required.

-G
Gary J. Orr
GaryOrrMBI (MBI Companies 2014-Current)
aka (past user names):
Gary_J_Orr (GOMO Stuff 2008-2014);
OrrG (Forum Studio 2005-2008);
Gary J. Orr (LHB Inc 2002-2005);
Orr, Gary J. (Gossen Livingston 1997-2002)
0 Likes

ashleyB5APU
Explorer
Explorer

Hi Gary, that worked perfectly. Thank you for the reply, much appreciated. 

0 Likes