Announcements

Starting in December, we will archive content from the community that is 10 years and older. This FAQ provides more information.

Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Get keynoteTable file location

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
ashleyB5APU
228 Views, 2 Replies

Get keynoteTable file location

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?

2 REPLIES 2
Message 2 of 3
GaryOrrMBI
in reply to: ashleyB5APU

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)
Message 3 of 3
ashleyB5APU
in reply to: GaryOrrMBI

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

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

Post to forums  

Autodesk Design & Make Report