RevitLinkStatus will be changed when using rlt.GetLinkedFileStatus(), just like Schrödinger's cat.

RevitLinkStatus will be changed when using rlt.GetLinkedFileStatus(), just like Schrödinger's cat.

Anonymous
Not applicable
323 Views
4 Replies
Message 1 of 5

RevitLinkStatus will be changed when using rlt.GetLinkedFileStatus(), just like Schrödinger's cat.

Anonymous
Not applicable

There is one thing like Schrödinger's cat.

1. Before use lookup to check the link status. is showing not loaded.
1.png

 

 

 

 

 

 

 

 

 

 

 

 

 

2. While checking via lookup the status is Not Found.

2.png

 

 

 

 

 

 

 

3. Then back to manage link panel, the status will change to Not found.

3.png

0 Likes
324 Views
4 Replies
Replies (4)
Message 2 of 5

RPTHOMAS108
Mentor
Mentor

That's similar to UI behaviour though isn't it? If the link is unloaded it doesn't look for it, if you try and load it 'not loaded' will switch to 'not found'.

 

If you use RevitLinkType.GetLinkedFileStatus you are asking the API to do a more specific check meaning it has to look for it and upon not finding it updates the link information to NotFound.

 

0 Likes
Message 3 of 5

Anonymous
Not applicable

Thanks for your reply @RPTHOMAS108 ,

So is there a way to get current status that showing in the manage link panel.

0 Likes
Message 4 of 5

RPTHOMAS108
Mentor
Mentor

People sometimes use TransmissionData i.e. 

 

TransmissionData.ReadTransmissionData(PathOfProjectFileContainingLinks)

 

Check ExternalFileReference.GetPath exists. From the RevitLinkType.IsLoaded property you can see if it is loaded or not. Can't say that these objects wouldn't have the same effect (looking at the result changes the result) but it is an alternative approach.

 

The link dialogue is not great in terms of it's 'reload a link to see if it exists' behaviour. So I'm not sure what the good reason would be for needing to replicate that? You have the opportunity to give a direct answer to the user.

0 Likes
Message 5 of 5

Anonymous
Not applicable

Hi @RPTHOMAS108 

Cause there is a requrest to extract CAD drawing from model though plugin, but when first the plugin need to check which link model in lost or not found before extract the drawing form the model but the link that status is NotLoad should be ignored cause that just used for coordinate issue, but now here can not get that correct status that are showing in the manage link panel, if we use that rlt.GetLinkedFileStatus() there will get all status that are NotFound but actualy they are NotLoad but not NotFound.

So here just try to find a way to get that currect Revit link status.

0 Likes