RevitAddInUtility - RevitProduct - InstallPath missing

RevitAddInUtility - RevitProduct - InstallPath missing

daniel
Enthusiast Enthusiast
1,173 Views
5 Replies
Message 1 of 6

RevitAddInUtility - RevitProduct - InstallPath missing

daniel
Enthusiast
Enthusiast

Hi, 

I have startet do encounter some troubles with the revit addin utility on some of my users machines. 

They don't get the installed path from RevitProduct (part of RevitAddinUtilty assembly) 

 

Have there been any updates on this reacently ? 

I have a loader program, to load my addin, and in this loader i query for the installed path of Revit produducts installed on the machine. 

This list is now reporting "/Revit 2021" not the full path.. 

 

 

0 Likes
Accepted solutions (1)
1,174 Views
5 Replies
Replies (5)
Message 2 of 6

Revitalizer
Advisor
Advisor

Hi,

 

I think there is a problem with the web installer since it doesn't write the product GUID in the registry.

No registry key -> no Revit installed.

 

Revitalizer




Rudolf Honke
Software Developer
Mensch und Maschine





0 Likes
Message 3 of 6

daniel
Enthusiast
Enthusiast

hm... 

I have thougth of that my self.. 

When i searched the registry for the installGuid  on one of the machines, it did return 

the product, and in the register the install path was written there.. 

 

The case is that it only occures on some machines, but not all, and I have tried the latest installer from Autodesk, and then it worked... maybe they have updated it the last couple of weeks ? or maybe in connection with updating.. 

All these customers do report problem after latest update of Revit 2021 

 

0 Likes
Message 4 of 6

daniel
Enthusiast
Enthusiast
Accepted solution

After even more digging on a customers computer, I tried to reinstall Revit hoping to solve the problem. 

 

It did the trick, so it seems like @Revitalizer was totaly correct in pointing out that the path wasn't correct 
written to registry. 

 

The problem, visually, was that the path was written to the registry but maybe there were someting wrong with the part that got the path through the installed Revit products. 

 

The customer I tried this things on, had installed versjon: 21.1.1.109, installed through the web installer on 02.09.20. 

When reinstalling he got 21.1.11.27 installed, using the webistaller on 07.10.2020

 

The issue seems to be solved in the installer, but there might be other cases like this, so it might be usefull to post something about it , @jeremytammik  ? 

 

I use this code to get the product; 

public static RevitProduct FindRevitProduct(Guid productCode)
{
  string substring = productCode.ToString().Substring(0, 18);
  List<RevitProduct> prods = 
  RevitProductUtility.GetAllInstalledRevitProducts();
           
  if (prods == null || prods.Count <= 0) return null;
  return (from prod in prods let substringThisProd = 
  prod.ProductCode.ToString().Substring(0, 18) where substring == 
  substringThisProd select prod).FirstOrDefault();
}

 

this returns the Revit2021 product, as excpected. 

Then I aske the returned RevitProduct about it's Installpath: 

var installPath = OneRevitProduct.InstallLocation; 

//the result of this call is: 

"/Revit 2021"

This produces the result as shown, wich is not the excpected path, and causes my problems. 

 

 

-Daniel

 

0 Likes
Message 5 of 6

jeremytammik
Autodesk
Autodesk

Dear Daniel,

  

Thank you for your observations and the suggestion to post something.

 

Can you clarify what exactly you think might be worth while posting?

 

For me, the description so far is still a bit confusing.

 

I think the most helpful thing to post would be a list of clear statements, such as:

 

  • There is a new problem with ??? in Revit version ???.
  • You observe it like this: ???
  • It can be easily solved like this: ???

 

Can you clarify and restructure your statements in some kind of similar way?

 

Thank you!

 

Cheers,

 

Jeremy

   



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 6 of 6

daniel
Enthusiast
Enthusiast

The problem

In some versions of Revit I have encountered problems with the Revit Addin-utility.

(known versions: 21.1.10.26, and 21.1.1.109)

The result of this call, gives Revit products, but the returned products don't report the full installpath of the specified product. 

List<RevitProduct> prods = 
  Autodesk.RevitAddIns.RevitProductUtility.GetAllInstalledRevitProducts();

 

The excpected result for a Revit product parameter :

RevitProduct.InstallLocation {get;}

 

should be : (ex)

"C:\Program Files\Autodesk\Revit 2021"

and when this error occures it is:

"\Revit 2021"

 

 

I my case this leads to the issue that I cant start correct Revit from my startup program.

 

Assumed source of error

It looks like it has been a bug in the update, or webinstaller for some time

 

Solution

The solution at the moment is to reinstall Revit 2021, using the latest webinstaller.

 

 

 

I hope it is a bit clearer, I have got 5-6 customers with this issue now, and I guess it more to come..

Daniel

0 Likes