A
archie456
Guest
Hi,
I have some code I put together that creates a plugin for Autodesk Revit.
As there are several versions of Revit, I've used some precompiler directive #if statements to conditionally compile different lines of code depending on the version of Revit, such as this:
#if DEBUG2018 || RELEASE2018
BitmapImage pb1slideoutImage = new BitmapImage(new Uri("pack://application:,,,/TPBRevitRibbon2018;component/Commands/Standards/StandardsLibrary.png"));
#endif
#if DEBUG2019 || RELEASE2019
BitmapImage pb1slideoutImage = new BitmapImage(new Uri("pack://application:,,,/TPBRevitRibbon2019;component/Commands/Standards/StandardsLibrary.png"));
#endif
This works well, but now I want to remove one of the versions and replace it with a new version - and so I'd like to rename: DEBUG2018 and RELEASE2018 to DEBUG2020 and RELEASE2020.
The problem I have is the Visual Studio rename tool won't rename these symbols - "you cannot rename this element"
If I had to run through my code and rename them manually that would take ages...
Any ideas how I can rename these?
Thanks.
Continue reading...
I have some code I put together that creates a plugin for Autodesk Revit.
As there are several versions of Revit, I've used some precompiler directive #if statements to conditionally compile different lines of code depending on the version of Revit, such as this:
#if DEBUG2018 || RELEASE2018
BitmapImage pb1slideoutImage = new BitmapImage(new Uri("pack://application:,,,/TPBRevitRibbon2018;component/Commands/Standards/StandardsLibrary.png"));
#endif
#if DEBUG2019 || RELEASE2019
BitmapImage pb1slideoutImage = new BitmapImage(new Uri("pack://application:,,,/TPBRevitRibbon2019;component/Commands/Standards/StandardsLibrary.png"));
#endif
This works well, but now I want to remove one of the versions and replace it with a new version - and so I'd like to rename: DEBUG2018 and RELEASE2018 to DEBUG2020 and RELEASE2020.
The problem I have is the Visual Studio rename tool won't rename these symbols - "you cannot rename this element"
If I had to run through my code and rename them manually that would take ages...
Any ideas how I can rename these?
Thanks.
Continue reading...