diff --git a/RibbonItemToolTipSample/RibbonItemToolTipSample.sln b/RibbonItemToolTipSample/RibbonItemToolTipSample.sln new file mode 100644 index 0000000..a9d7340 --- /dev/null +++ b/RibbonItemToolTipSample/RibbonItemToolTipSample.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.7.34031.279 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RibbonItemToolTipSample", "RibbonItemToolTipSample\RibbonItemToolTipSample.csproj", "{78FCA769-84EB-4618-8415-88BB1E5049BB}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {78FCA769-84EB-4618-8415-88BB1E5049BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {78FCA769-84EB-4618-8415-88BB1E5049BB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {78FCA769-84EB-4618-8415-88BB1E5049BB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {78FCA769-84EB-4618-8415-88BB1E5049BB}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {26D788F8-A30B-41D5-9DE0-4A33F3DDD0E6} + EndGlobalSection +EndGlobal diff --git a/RibbonItemToolTipSample/RibbonItemToolTipSample/ExternalApplication.cs b/RibbonItemToolTipSample/RibbonItemToolTipSample/ExternalApplication.cs new file mode 100644 index 0000000..7c55696 --- /dev/null +++ b/RibbonItemToolTipSample/RibbonItemToolTipSample/ExternalApplication.cs @@ -0,0 +1,66 @@ +using Autodesk.Revit.UI; +using Autodesk.Windows; +using SCADtools.Revit.UI; +using System; +using System.Linq; +using System.Reflection; +using System.Windows.Media.Imaging; + +namespace SCADtools.RibbonItemToolTipSample +{ + public class ExternalApplication : IExternalApplication + { + private static readonly string assemblyName = Assembly.GetExecutingAssembly().Location; + private static readonly string tabName = "SCADtools"; + private static readonly string panelName = "Sample"; + + public Result OnStartup(UIControlledApplication application) + { + CreateRibbonTab(application); + + return Result.Succeeded; + } + public Result OnShutdown(UIControlledApplication application) + { + return Result.Succeeded; + } + + private static void CreateRibbonTab(UIControlledApplication application) + { + application.CreateRibbonTab(tabName); + + Autodesk.Revit.UI.RibbonPanel ribbonPanel = application.CreateRibbonPanel(tabName, panelName); + + PushButtonData pushButtonData = CreatePushButtonData(); + ribbonPanel.AddItem(pushButtonData); + + RibbonTab ribbonTab = ComponentManager.Ribbon.Tabs.First(x => x.Title == tabName); + RibbonPanelSource ribbonPanelSource = ribbonTab.Panels.Select(x => x.Source).Single(x => x.AutomationName == ribbonPanel.Name); + Autodesk.Windows.RibbonButton ribbonButton = (Autodesk.Windows.RibbonButton)ribbonPanelSource. + FindItem("CustomCtrl_%CustomCtrl_%" + tabName + "%" + + ribbonPanelSource.Name + "%" + + pushButtonData.Name); + + ribbonButton.ToolTip = new RibbonItemToolTip() + { + Title = "Stair Symbol", + Content = "Insert stair symbology.", + ExpandedContent = "Allows assigning a stair symbol to represent the starting and ending runs.", + ExpandedImage = new BitmapImage(new Uri("pack://application:,,,/RibbonItemToolTipSample;component/Images/StairSymbolTooltip.gif")) + }; + } + + private static PushButtonData CreatePushButtonData() + { + string className = "SCADtools.RibbonItemToolTipSample.Sample"; + Uri uriImage = new Uri("pack://application:,,,/RibbonItemToolTipSample;component/Images/struturalplan_symbol_stair_32_light.png"); + PushButtonData pushButtonData = new PushButtonData("PushButtonDataSample", "Sample", assemblyName, className) + { + LargeImage = new BitmapImage(uriImage), + Text = "Stair" + "\r\n" + "Symbol" + }; + + return pushButtonData; + } + } +} diff --git a/RibbonItemToolTipSample/RibbonItemToolTipSample/Images/StairSymbolTooltip.gif b/RibbonItemToolTipSample/RibbonItemToolTipSample/Images/StairSymbolTooltip.gif new file mode 100644 index 0000000..9c421e5 Binary files /dev/null and b/RibbonItemToolTipSample/RibbonItemToolTipSample/Images/StairSymbolTooltip.gif differ diff --git a/RibbonItemToolTipSample/RibbonItemToolTipSample/Images/struturalplan_symbol_stair_32_light.png b/RibbonItemToolTipSample/RibbonItemToolTipSample/Images/struturalplan_symbol_stair_32_light.png new file mode 100644 index 0000000..912cde9 Binary files /dev/null and b/RibbonItemToolTipSample/RibbonItemToolTipSample/Images/struturalplan_symbol_stair_32_light.png differ diff --git a/RibbonItemToolTipSample/RibbonItemToolTipSample/Properties/AssemblyInfo.cs b/RibbonItemToolTipSample/RibbonItemToolTipSample/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..02740f1 --- /dev/null +++ b/RibbonItemToolTipSample/RibbonItemToolTipSample/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// La información general de un ensamblado se controla mediante el siguiente +// conjunto de atributos. Cambie estos valores de atributo para modificar la información +// asociada con un ensamblado. +[assembly: AssemblyTitle("RibbonItemToolTipSample")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("RibbonItemToolTipSample")] +[assembly: AssemblyCopyright("SCADtools Copyright © 2024")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Si establece ComVisible en false, los tipos de este ensamblado no estarán visibles +// para los componentes COM. Si es necesario obtener acceso a un tipo en este ensamblado desde +// COM, establezca el atributo ComVisible en true en este tipo. +[assembly: ComVisible(false)] + +// El siguiente GUID sirve como id. de typelib si este proyecto se expone a COM. +[assembly: Guid("78fca769-84eb-4618-8415-88bb1e5049bb")] + +// La información de versión de un ensamblado consta de los cuatro valores siguientes: +// +// Versión principal +// Versión secundaria +// Número de compilación +// Revisión +// +// Puede especificar todos los valores o usar los valores predeterminados de número de compilación y de revisión +// utilizando el carácter "*", como se muestra a continuación: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/RibbonItemToolTipSample/RibbonItemToolTipSample/RibbonItemToolTipSample.addin b/RibbonItemToolTipSample/RibbonItemToolTipSample/RibbonItemToolTipSample.addin new file mode 100644 index 0000000..8ea84b7 --- /dev/null +++ b/RibbonItemToolTipSample/RibbonItemToolTipSample/RibbonItemToolTipSample.addin @@ -0,0 +1,11 @@ + + + + RibbonItemToolTipSample + RibbonItemToolTipSample.dll + DFE4E58E-6B68-4809-AC39-EE3B166AB767 + SCADtools.RibbonItemToolTipSample.ExternalApplication + SCADtools + SCADtools, www.scadtools.cl + + \ No newline at end of file diff --git a/RibbonItemToolTipSample/RibbonItemToolTipSample/RibbonItemToolTipSample.csproj b/RibbonItemToolTipSample/RibbonItemToolTipSample/RibbonItemToolTipSample.csproj new file mode 100644 index 0000000..f289792 --- /dev/null +++ b/RibbonItemToolTipSample/RibbonItemToolTipSample/RibbonItemToolTipSample.csproj @@ -0,0 +1,87 @@ + + + + + Debug + AnyCPU + {78FCA769-84EB-4618-8415-88BB1E5049BB} + Library + Properties + SCADtools.RibbonItemToolTipSample + RibbonItemToolTipSample + v4.8 + 512 + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + x64 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\..\..\..\..\..\..\..\..\..\Program Files\Autodesk\Revit 2023\AdWindows.dll + False + + + + + ..\..\..\..\..\..\..\..\..\..\Program Files\Autodesk\Revit 2023\RevitAPI.dll + False + + + ..\..\..\..\..\..\..\..\..\..\Program Files\Autodesk\Revit 2023\RevitAPIUI.dll + False + + + False + ..\..\RibbonItemToolTip.rvt2023\RibbonItemToolTip.rvt2023\obfuscated\SCADtools.Revit.UI.RibbonItemToolTip.dll + + + + + + + + + + + + + + + + + + + PreserveNewest + + + + + PreserveNewest + + + + + PreserveNewest + + + + + copy "$(TargetDir)"."" "$(AppData)\Autodesk\Revit\Addins\2023" + + \ No newline at end of file diff --git a/RibbonItemToolTipSample/RibbonItemToolTipSample/RibbonItemToolTipSample.csproj.user b/RibbonItemToolTipSample/RibbonItemToolTipSample/RibbonItemToolTipSample.csproj.user new file mode 100644 index 0000000..9b393f6 --- /dev/null +++ b/RibbonItemToolTipSample/RibbonItemToolTipSample/RibbonItemToolTipSample.csproj.user @@ -0,0 +1,7 @@ + + + + Program + C:\Program Files\Autodesk\Revit 2023\Revit.exe + + \ No newline at end of file diff --git a/RibbonItemToolTipSample/RibbonItemToolTipSample/Sample.cs b/RibbonItemToolTipSample/RibbonItemToolTipSample/Sample.cs new file mode 100644 index 0000000..1826624 --- /dev/null +++ b/RibbonItemToolTipSample/RibbonItemToolTipSample/Sample.cs @@ -0,0 +1,28 @@ +using Autodesk.Revit.Attributes; +using Autodesk.Revit.DB; +using Autodesk.Revit.UI; +using System; + +namespace SCADtools.RibbonItemToolTipSample +{ + [Transaction(TransactionMode.Manual)] + internal class Sample : IExternalCommand + { + public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements) + { + try + { + return Result.Succeeded; + } + catch (Exception ex) + { + message = ex.Message; + return Result.Failed; + } + finally + { + + } + } + } +} diff --git a/RibbonItemToolTipSample/RibbonItemToolTipSample/bin/Debug/RibbonItemToolTipSample.addin b/RibbonItemToolTipSample/RibbonItemToolTipSample/bin/Debug/RibbonItemToolTipSample.addin new file mode 100644 index 0000000..8ea84b7 --- /dev/null +++ b/RibbonItemToolTipSample/RibbonItemToolTipSample/bin/Debug/RibbonItemToolTipSample.addin @@ -0,0 +1,11 @@ + + + + RibbonItemToolTipSample + RibbonItemToolTipSample.dll + DFE4E58E-6B68-4809-AC39-EE3B166AB767 + SCADtools.RibbonItemToolTipSample.ExternalApplication + SCADtools + SCADtools, www.scadtools.cl + + \ No newline at end of file diff --git a/RibbonItemToolTipSample/RibbonItemToolTipSample/bin/Debug/RibbonItemToolTipSample.dll b/RibbonItemToolTipSample/RibbonItemToolTipSample/bin/Debug/RibbonItemToolTipSample.dll new file mode 100644 index 0000000..04b019a Binary files /dev/null and b/RibbonItemToolTipSample/RibbonItemToolTipSample/bin/Debug/RibbonItemToolTipSample.dll differ diff --git a/RibbonItemToolTipSample/RibbonItemToolTipSample/bin/Debug/RibbonItemToolTipSample.pdb b/RibbonItemToolTipSample/RibbonItemToolTipSample/bin/Debug/RibbonItemToolTipSample.pdb new file mode 100644 index 0000000..08e5b6a Binary files /dev/null and b/RibbonItemToolTipSample/RibbonItemToolTipSample/bin/Debug/RibbonItemToolTipSample.pdb differ diff --git a/RibbonItemToolTipSample/RibbonItemToolTipSample/bin/Debug/SCADtools.Revit.UI.RibbonItemToolTip.dll b/RibbonItemToolTipSample/RibbonItemToolTipSample/bin/Debug/SCADtools.Revit.UI.RibbonItemToolTip.dll new file mode 100644 index 0000000..b1572d8 Binary files /dev/null and b/RibbonItemToolTipSample/RibbonItemToolTipSample/bin/Debug/SCADtools.Revit.UI.RibbonItemToolTip.dll differ diff --git a/RibbonItemToolTipSample/RibbonItemToolTipSample/bin/Debug/SCADtools.Revit.UI.RibbonItemToolTip.pdb b/RibbonItemToolTipSample/RibbonItemToolTipSample/bin/Debug/SCADtools.Revit.UI.RibbonItemToolTip.pdb new file mode 100644 index 0000000..7efa31c Binary files /dev/null and b/RibbonItemToolTipSample/RibbonItemToolTipSample/bin/Debug/SCADtools.Revit.UI.RibbonItemToolTip.pdb differ diff --git a/RibbonItemToolTipSample/RibbonItemToolTipSample/obj/Debug/DesignTimeResolveAssemblyReferences.cache b/RibbonItemToolTipSample/RibbonItemToolTipSample/obj/Debug/DesignTimeResolveAssemblyReferences.cache new file mode 100644 index 0000000..e79ae3b Binary files /dev/null and b/RibbonItemToolTipSample/RibbonItemToolTipSample/obj/Debug/DesignTimeResolveAssemblyReferences.cache differ diff --git a/RibbonItemToolTipSample/RibbonItemToolTipSample/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/RibbonItemToolTipSample/RibbonItemToolTipSample/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..cfda24a Binary files /dev/null and b/RibbonItemToolTipSample/RibbonItemToolTipSample/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/RibbonItemToolTipSample/RibbonItemToolTipSample/obj/Debug/RibbonItemToolTipSample.csproj.AssemblyReference.cache b/RibbonItemToolTipSample/RibbonItemToolTipSample/obj/Debug/RibbonItemToolTipSample.csproj.AssemblyReference.cache new file mode 100644 index 0000000..3c3e695 Binary files /dev/null and b/RibbonItemToolTipSample/RibbonItemToolTipSample/obj/Debug/RibbonItemToolTipSample.csproj.AssemblyReference.cache differ diff --git a/RibbonItemToolTipSample/RibbonItemToolTipSample/obj/Debug/RibbonItemToolTipSample.csproj.CopyComplete b/RibbonItemToolTipSample/RibbonItemToolTipSample/obj/Debug/RibbonItemToolTipSample.csproj.CopyComplete new file mode 100644 index 0000000..e69de29 diff --git a/RibbonItemToolTipSample/RibbonItemToolTipSample/obj/Debug/RibbonItemToolTipSample.csproj.CoreCompileInputs.cache b/RibbonItemToolTipSample/RibbonItemToolTipSample/obj/Debug/RibbonItemToolTipSample.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..b4d7301 --- /dev/null +++ b/RibbonItemToolTipSample/RibbonItemToolTipSample/obj/Debug/RibbonItemToolTipSample.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +ddb19c40df5632f0bd2d7cc5c2cc5554b6b025e0 diff --git a/RibbonItemToolTipSample/RibbonItemToolTipSample/obj/Debug/RibbonItemToolTipSample.csproj.FileListAbsolute.txt b/RibbonItemToolTipSample/RibbonItemToolTipSample/obj/Debug/RibbonItemToolTipSample.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..3bd0bef --- /dev/null +++ b/RibbonItemToolTipSample/RibbonItemToolTipSample/obj/Debug/RibbonItemToolTipSample.csproj.FileListAbsolute.txt @@ -0,0 +1,11 @@ +C:\Users\elias\OneDrive\Escritorio\Curso Revit API\Ejercicios\AlphaRebar\Revit\RibbonItemToolTipSample\RibbonItemToolTipSample\bin\Debug\RibbonItemToolTipSample.addin +C:\Users\elias\OneDrive\Escritorio\Curso Revit API\Ejercicios\AlphaRebar\Revit\RibbonItemToolTipSample\RibbonItemToolTipSample\bin\Debug\RibbonItemToolTipSample.dll +C:\Users\elias\OneDrive\Escritorio\Curso Revit API\Ejercicios\AlphaRebar\Revit\RibbonItemToolTipSample\RibbonItemToolTipSample\bin\Debug\RibbonItemToolTipSample.pdb +C:\Users\elias\OneDrive\Escritorio\Curso Revit API\Ejercicios\AlphaRebar\Revit\RibbonItemToolTipSample\RibbonItemToolTipSample\bin\Debug\SCADtools.Revit.UI.RibbonItemToolTip.dll +C:\Users\elias\OneDrive\Escritorio\Curso Revit API\Ejercicios\AlphaRebar\Revit\RibbonItemToolTipSample\RibbonItemToolTipSample\bin\Debug\SCADtools.Revit.UI.RibbonItemToolTip.pdb +C:\Users\elias\OneDrive\Escritorio\Curso Revit API\Ejercicios\AlphaRebar\Revit\RibbonItemToolTipSample\RibbonItemToolTipSample\obj\Debug\RibbonItemToolTipSample.csproj.AssemblyReference.cache +C:\Users\elias\OneDrive\Escritorio\Curso Revit API\Ejercicios\AlphaRebar\Revit\RibbonItemToolTipSample\RibbonItemToolTipSample\obj\Debug\RibbonItemToolTipSample.g.resources +C:\Users\elias\OneDrive\Escritorio\Curso Revit API\Ejercicios\AlphaRebar\Revit\RibbonItemToolTipSample\RibbonItemToolTipSample\obj\Debug\RibbonItemToolTipSample.csproj.CoreCompileInputs.cache +C:\Users\elias\OneDrive\Escritorio\Curso Revit API\Ejercicios\AlphaRebar\Revit\RibbonItemToolTipSample\RibbonItemToolTipSample\obj\Debug\RibbonItemToolTipSample.csproj.CopyComplete +C:\Users\elias\OneDrive\Escritorio\Curso Revit API\Ejercicios\AlphaRebar\Revit\RibbonItemToolTipSample\RibbonItemToolTipSample\obj\Debug\RibbonItemToolTipSample.dll +C:\Users\elias\OneDrive\Escritorio\Curso Revit API\Ejercicios\AlphaRebar\Revit\RibbonItemToolTipSample\RibbonItemToolTipSample\obj\Debug\RibbonItemToolTipSample.pdb diff --git a/RibbonItemToolTipSample/RibbonItemToolTipSample/obj/Debug/RibbonItemToolTipSample.dll b/RibbonItemToolTipSample/RibbonItemToolTipSample/obj/Debug/RibbonItemToolTipSample.dll new file mode 100644 index 0000000..04b019a Binary files /dev/null and b/RibbonItemToolTipSample/RibbonItemToolTipSample/obj/Debug/RibbonItemToolTipSample.dll differ diff --git a/RibbonItemToolTipSample/RibbonItemToolTipSample/obj/Debug/RibbonItemToolTipSample.g.resources b/RibbonItemToolTipSample/RibbonItemToolTipSample/obj/Debug/RibbonItemToolTipSample.g.resources new file mode 100644 index 0000000..99368a9 Binary files /dev/null and b/RibbonItemToolTipSample/RibbonItemToolTipSample/obj/Debug/RibbonItemToolTipSample.g.resources differ diff --git a/RibbonItemToolTipSample/RibbonItemToolTipSample/obj/Debug/RibbonItemToolTipSample.pdb b/RibbonItemToolTipSample/RibbonItemToolTipSample/obj/Debug/RibbonItemToolTipSample.pdb new file mode 100644 index 0000000..08e5b6a Binary files /dev/null and b/RibbonItemToolTipSample/RibbonItemToolTipSample/obj/Debug/RibbonItemToolTipSample.pdb differ