Skip to content

SwEx.PMPage - framework for building the data driven property manager pages in SOLIDWORKS add-ins

License

Notifications You must be signed in to change notification settings

codestackdev/swex-pmpage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Documentation NuGet Issues

SwEx.PMPage

SwEx.PMPage Inspired by PropertyGrid Control in .NET Framework, SwEx.PMPage brings the flexibility of data model driven User Interface into SOLIDWORKS API.

Framework allows to use data model structure as a driver of the User Interface. Framework will automatically generate required interface and implement the binding of the model.

This will greatly reduce the implementation time as well as make the property pages scalable, easily maintainable and extendable.

Getting started

Start by defining the data model required to be filled by property manager page.

C#

public class DataModel
{
    public string Text { get; set; }
    public int Size { get; set; } = 48;
    public double Number { get;set; } = 10.5;
}

VB.NET

Public Class DataModel
    Public Property Text As String
    Public Property Size As Integer = 48
    Public Property Number As Double = 10.5
End Class

Create handler for property manager page by inheriting the public COM-visible class from PropertyManagerPageHandlerEx class.

This class will be instantiated by the framework and will allow handling the property manager specific events from the add-in.

C#

[ComVisible(true)]
public class MyPMPageHandler : PropertyManagerPageHandlerEx
{
}

VB.NET

<ComVisible(True)>
Public Class MyPMPageHandler
    Inherits PropertyManagerPageHandlerEx
End Class

Create instance of the property manager page by passing the type of the handler and data model instance into the generic arguments

C#

private PropertyManagerPageEx<MyPMPageHandler, DataModel> m_MyPage;
private DataModel m_Data = new DataModel();
...
m_Page = new PropertyManagerPageEx<MyPMPageHandler, DataModel>(m_Data, m_App);
m_Page.Show();

VB.NET

Dim m_MyPage As PropertyManagerPageEx(Of MyPMPageHandler, DataModel)
Dim m_Data As DataModel = New DataModel()
...
m_Page = New PropertyManagerPageEx(Of MyPMPageHandler, DataModel)(m_Data, m_App)
m_Page.Show()

Refer documentation and API reference for more information about additional options.

About

SwEx.PMPage - framework for building the data driven property manager pages in SOLIDWORKS add-ins

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages