-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
283 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
66 changes: 66 additions & 0 deletions
66
RibbonItemToolTipSample/RibbonItemToolTipSample/ExternalApplication.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} | ||
} | ||
} |
Binary file added
BIN
+23 KB
RibbonItemToolTipSample/RibbonItemToolTipSample/Images/StairSymbolTooltip.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.23 KB
...ipSample/RibbonItemToolTipSample/Images/struturalplan_symbol_stair_32_light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 36 additions & 0 deletions
36
RibbonItemToolTipSample/RibbonItemToolTipSample/Properties/AssemblyInfo.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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")] |
11 changes: 11 additions & 0 deletions
11
RibbonItemToolTipSample/RibbonItemToolTipSample/RibbonItemToolTipSample.addin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0" encoding="utf-8" standalone="no"?> | ||
<RevitAddIns> | ||
<AddIn Type="Application"> | ||
<Name>RibbonItemToolTipSample</Name> | ||
<Assembly>RibbonItemToolTipSample.dll</Assembly> | ||
<AddInId>DFE4E58E-6B68-4809-AC39-EE3B166AB767</AddInId> | ||
<FullClassName>SCADtools.RibbonItemToolTipSample.ExternalApplication</FullClassName> | ||
<VendorId>SCADtools</VendorId> | ||
<VendorDescription>SCADtools, www.scadtools.cl</VendorDescription> | ||
</AddIn> | ||
</RevitAddIns> |
87 changes: 87 additions & 0 deletions
87
RibbonItemToolTipSample/RibbonItemToolTipSample/RibbonItemToolTipSample.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<ProjectGuid>{78FCA769-84EB-4618-8415-88BB1E5049BB}</ProjectGuid> | ||
<OutputType>Library</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>SCADtools.RibbonItemToolTipSample</RootNamespace> | ||
<AssemblyName>RibbonItemToolTipSample</AssemblyName> | ||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion> | ||
<FileAlignment>512</FileAlignment> | ||
<Deterministic>true</Deterministic> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>bin\Debug\</OutputPath> | ||
<DefineConstants>DEBUG;TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
<PlatformTarget>x64</PlatformTarget> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<DebugType>pdbonly</DebugType> | ||
<Optimize>true</Optimize> | ||
<OutputPath>bin\Release\</OutputPath> | ||
<DefineConstants>TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="AdWindows"> | ||
<HintPath>..\..\..\..\..\..\..\..\..\..\Program Files\Autodesk\Revit 2023\AdWindows.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="PresentationCore" /> | ||
<Reference Include="PresentationFramework" /> | ||
<Reference Include="RevitAPI"> | ||
<HintPath>..\..\..\..\..\..\..\..\..\..\Program Files\Autodesk\Revit 2023\RevitAPI.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="RevitAPIUI"> | ||
<HintPath>..\..\..\..\..\..\..\..\..\..\Program Files\Autodesk\Revit 2023\RevitAPIUI.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="SCADtools.Revit.UI.RibbonItemToolTip, Version=1.0.0.0, Culture=neutral, processorArchitecture=AMD64"> | ||
<SpecificVersion>False</SpecificVersion> | ||
<HintPath>..\..\RibbonItemToolTip.rvt2023\RibbonItemToolTip.rvt2023\obfuscated\SCADtools.Revit.UI.RibbonItemToolTip.dll</HintPath> | ||
</Reference> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Core" /> | ||
<Reference Include="System.Xml.Linq" /> | ||
<Reference Include="System.Data.DataSetExtensions" /> | ||
<Reference Include="Microsoft.CSharp" /> | ||
<Reference Include="System.Data" /> | ||
<Reference Include="System.Net.Http" /> | ||
<Reference Include="System.Xml" /> | ||
<Reference Include="WindowsBase" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="ExternalApplication.cs" /> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
<Compile Include="Sample.cs" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Resource Include="Images\StairSymbolTooltip.gif"> | ||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||
</Resource> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Resource Include="Images\struturalplan_symbol_stair_32_light.png"> | ||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||
</Resource> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Content Include="RibbonItemToolTipSample.addin"> | ||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||
</Content> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||
<PropertyGroup> | ||
<PostBuildEvent>copy "$(TargetDir)"."" "$(AppData)\Autodesk\Revit\Addins\2023"</PostBuildEvent> | ||
</PropertyGroup> | ||
</Project> |
7 changes: 7 additions & 0 deletions
7
RibbonItemToolTipSample/RibbonItemToolTipSample/RibbonItemToolTipSample.csproj.user
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'"> | ||
<StartAction>Program</StartAction> | ||
<StartProgram>C:\Program Files\Autodesk\Revit 2023\Revit.exe</StartProgram> | ||
</PropertyGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
{ | ||
|
||
} | ||
} | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
RibbonItemToolTipSample/RibbonItemToolTipSample/bin/Debug/RibbonItemToolTipSample.addin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0" encoding="utf-8" standalone="no"?> | ||
<RevitAddIns> | ||
<AddIn Type="Application"> | ||
<Name>RibbonItemToolTipSample</Name> | ||
<Assembly>RibbonItemToolTipSample.dll</Assembly> | ||
<AddInId>DFE4E58E-6B68-4809-AC39-EE3B166AB767</AddInId> | ||
<FullClassName>SCADtools.RibbonItemToolTipSample.ExternalApplication</FullClassName> | ||
<VendorId>SCADtools</VendorId> | ||
<VendorDescription>SCADtools, www.scadtools.cl</VendorDescription> | ||
</AddIn> | ||
</RevitAddIns> |
Binary file added
BIN
+32 KB
RibbonItemToolTipSample/RibbonItemToolTipSample/bin/Debug/RibbonItemToolTipSample.dll
Binary file not shown.
Binary file added
BIN
+27.5 KB
RibbonItemToolTipSample/RibbonItemToolTipSample/bin/Debug/RibbonItemToolTipSample.pdb
Binary file not shown.
Binary file added
BIN
+43.5 KB
...mToolTipSample/RibbonItemToolTipSample/bin/Debug/SCADtools.Revit.UI.RibbonItemToolTip.dll
Binary file not shown.
Binary file added
BIN
+11.5 KB
...mToolTipSample/RibbonItemToolTipSample/bin/Debug/SCADtools.Revit.UI.RibbonItemToolTip.pdb
Binary file not shown.
Binary file added
BIN
+203 Bytes
...ToolTipSample/RibbonItemToolTipSample/obj/Debug/DesignTimeResolveAssemblyReferences.cache
Binary file not shown.
Binary file added
BIN
+7.5 KB
...ipSample/RibbonItemToolTipSample/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
Binary file not shown.
Binary file added
BIN
+65.4 KB
.../RibbonItemToolTipSample/obj/Debug/RibbonItemToolTipSample.csproj.AssemblyReference.cache
Binary file not shown.
Empty file.
1 change: 1 addition & 0 deletions
1
.../RibbonItemToolTipSample/obj/Debug/RibbonItemToolTipSample.csproj.CoreCompileInputs.cache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ddb19c40df5632f0bd2d7cc5c2cc5554b6b025e0 |
11 changes: 11 additions & 0 deletions
11
...ple/RibbonItemToolTipSample/obj/Debug/RibbonItemToolTipSample.csproj.FileListAbsolute.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
Binary file added
BIN
+32 KB
RibbonItemToolTipSample/RibbonItemToolTipSample/obj/Debug/RibbonItemToolTipSample.dll
Binary file not shown.
Binary file added
BIN
+24.6 KB
...onItemToolTipSample/RibbonItemToolTipSample/obj/Debug/RibbonItemToolTipSample.g.resources
Binary file not shown.
Binary file added
BIN
+27.5 KB
RibbonItemToolTipSample/RibbonItemToolTipSample/obj/Debug/RibbonItemToolTipSample.pdb
Binary file not shown.