Hymma.Solidworks.Addins.Fluent
2018.3.0
Prefix Reserved
Requires NuGet 2.5 or higher.
dotnet add package Hymma.Solidworks.Addins.Fluent --version 2018.3.0
NuGet\Install-Package Hymma.Solidworks.Addins.Fluent -Version 2018.3.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Hymma.Solidworks.Addins.Fluent" Version="2018.3.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Hymma.Solidworks.Addins.Fluent --version 2018.3.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Hymma.Solidworks.Addins.Fluent, 2018.3.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Hymma.Solidworks.Addins.Fluent as a Cake Addin #addin nuget:?package=Hymma.Solidworks.Addins.Fluent&version=2018.3.0 // Install Hymma.Solidworks.Addins.Fluent as a Cake Tool #tool nuget:?package=Hymma.Solidworks.Addins.Fluent&version=2018.3.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Overview
Making native-looking SOLIDWORKS Addins is time consuming and has a steep learning curve. This package was originally made for internal use in HYMMA and now is available to the public. It allows creating a complex UI in a property manager page in SOLIDWORKS with fluent API.
Key Features
- Fluent API
- Supports Bitmaps
- No need to create sprites for Commands
- Each of Property manager page controllers have separate class that supports events so you don't need to worry about IPropertyManagerPage2Handler9.
How to start
Since this package is built on top of Hymma.Solidworks.Addins you need to inherit from AddinMaker.cs
and override the GetUserInterFace()
.
<================FROM QRIFYPLUS PROJECT===============>
public override AddinUserInterface GetUserInterFace()
{
var builder = this.GetBuilder();
builder
.AddCommandTab() //An Addin must have a command tab that hosts the command group which in turn hosts the commands
.WithTitle("QRify+")
.That()
.IsVisibleIn(new[] { swDocumentTypes_e.swDocDRAWING }) //Define which document types this command tab should be accessible from
.SetCommandGroup(1) //Add a command group with ID 1. or else if you want. this id and the GUID of this add-in should be unique. once you updated your addin you should change this ID to hold backward compatibility
.WithTitle("&File\\Qrify+") //Define a title for command group and place the group under File menu in solidworks. for most Ui elements solidworks will not load the ui if they don't have a title
.WithIcon(Properties.Resources.qrifyPlus) //An Icon for the command group
.Has() //change context
.Commands(() => //Add commands to the command group
{
return new AddinCommand[]
{
new AddinCommand("QRify+", "QRify+", "QRify+", Properties.Resources.qrifyPlus, nameof(ShowQrifyPlusPmp), enableMethode:nameof(QrifyPlusPmpEnabler)),
};
})
.SaveCommandGroup() //Save the command group
.SaveCommandTab() //Save the command tab to the builder
.AddPropertyManagerPage("QRify+", this.Solidworks) //Add property manager page to the list of UI that the builder will create
.AddTab<QrPlusTab>() //Best practice to add tabs with complex Ui setup
.AddTab("Settings", Properties.Resources.infoPlus) //A Property manager page can or cannot have a tab that host the groups. A group hosts the controls such as text box and selection box and ...
.AddGroup(caption: "Settings Controls") //Add a group to property manager page Tab
.That() //Just showing off
.HasTheseControls(GetSettingsControls) //add Controls to the property manager page group
.SetExpansion(true) //Expanded or not expanded on display
.OnExpansionChange(null) //Event to fire once group expansion changes
.SaveGroup() //Save the property manager page group
.SaveTab() //Save the property manger page tab
.OnClosing((r)=>closeCallBackRegistry.DuringClose(r)) //Solidworks exposes this API but actually locks the UI and most of the command will have no effect. THIS IS IMPORTANT
.OnAfterClose(()=>closeCallBackRegistry.AfterClose()) //Once the Property Manager Page is closed for good
.SavePropertyManagerPage(out PmpFactoryX64 pmpFactoryX64); //expose the object that is responsible for showing th property manager page
this.pmpFactory = pmpFactoryX64;
return builder.Build(); //Build the UI
<==============CONTINUED ON QRIFYPLUS PROJECT==============>
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net48 is compatible. net481 was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETFramework 4.8
- Hymma.Solidworks.Addins (>= 2018.2.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated | |
---|---|---|---|
2018.3.0 | 71 | 7/25/2024 | |
2018.2.9 | 114 | 7/22/2024 | |
2018.2.3 | 69 | 7/25/2024 | |
2018.2.2 | 96 | 7/24/2024 | |
2018.2.1 | 96 | 7/22/2024 | |
2018.2.0 | 118 | 7/22/2024 | |
2018.1.9 | 91 | 7/22/2024 | |
2018.1.8 | 103 | 6/28/2024 | |
2018.1.7 | 109 | 6/27/2024 | |
2018.1.6 | 96 | 6/10/2024 | |
2018.1.5 | 110 | 6/3/2024 | |
2018.1.3 | 109 | 5/1/2024 | |
2018.1.2 | 122 | 4/20/2024 | |
2018.1.1 | 119 | 4/20/2024 | |
2018.0.0 | 479 | 2/13/2022 | |
18.0.2 | 496 | 1/11/2022 | |
18.0.1 | 479 | 1/11/2022 | |
18.0.0 | 498 | 1/8/2022 |
Changed version to 2018.