### VB.NET: Basic Custom Command Structure for SP3D API
Source: https://context7_llms
Demonstrates the minimal setup for an SP3D API Custom Command in VB.NET. It inherits from BaseModalCommand and overrides essential methods like OnStart, which serves as the entry point for compiled .dll commands. Dependencies are imported, and basic UI flag settings are shown.
```vb.net
Imports Ingr.SP3D.Common.Client
Public Class CustomCommand
Inherits BaseModalCommand
Public Overrides ReadOnly Property EnableUIFlags() As Integer
Get
Return MyBase.EnableUIFlags
EnableUIFlags = EnableUIFlagSettings.ActiveView
End Get
End Property
Public Overrides Sub OnIdle()
MyBase.OnIdle()
End Sub
Public Overrides Sub OnResume()
MyBase.OnResume()
End Sub
Public Overrides Sub OnSuspend()
MyBase.OnSuspend()
End Sub
Public Overrides Sub OnStop()
MyBase.OnStop()
End Sub
'''
''' The Custom Command starts here, this is the enty point
'''
'''
'''
Public Overrides Sub OnStart(ByVal commandID As Integer, ByVal argument As Object)
MyBase.OnStart(commandID, argument)
End Sub
```
--------------------------------
### VB.NET: Define Plant Connection Objects for SP3D API
Source: https://context7_llms
Shows how to obtain essential connection objects in VB.NET for editing plant data via a Custom Command. It retrieves TransactionManager, Plant, Model, Catalog, SP3DConnection, and CatalogBaseHelper objects by importing necessary services and utilizing the MiddleServiceProvider.
```vb.net
Imports Ingr.SP3D.Common.Middle.Services
Dim oTransactionMgr As TransactionManager = MiddleServiceProvider.TransactionMgr
oPlant = MiddleServiceProvider.SiteMgr.ActiveSite.ActivePlant
oModel = oPlant.PlantModel
Dim oCatalog As Catalog = oModel.PlantCatalog
Dim oConn As SP3DConnection = oCatalog
Dim oCatalogBaseHelper As New CatalogBaseHelper(oConn)
```
=== COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.