When I use Constant Generator function from the Menu to generate VB.NET code from Class diagram. They created codes according to the diagram but methods didn’t contain any formal parameters, although I added attibutes for the method during design diagram !
Thanks for your reply. May I know which class contain the problem you reported? I generated VB.NET code, and randomly picked up several classes for inspection. Unfortunately, I am unable to find any problem.
Procedure to reproduce :
I pick menu Tool > Constant Generator --> VB.NET
In the class selection dialog, I chosen all classes and click Generate.
Below is an example. (In the diagram, the method SetNumRowPerPage(RowNum : Integer) has a parameter is RowNum. But as you see below the code didn’t contain !)
Imports System.Data
Namespace QuoteList
Public Class [VancoDataGridView]
Inherits GridView
Private isShowCheckBox As Boolean
Private NumRowPerPage As Integer
Private isActivating As Boolean
Private isHighlightQuote As Boolean
Private DataSourceToShow As DataSet
Private QUOTE_HIGHLIGHT_BACKCOLOR As Integer
Private QUOTE_HIGHLIGHT_FORECOLOR As Integer
Private QUOTE_NORMAL_BACKCOLOR As Integer
Private QUOTE_NORMAL_FORECOLOR As Integer
Private ROW_HEIGHT As Integer
Public Event onSelectQuote(ByVal QuoteID As Integer, ByVal RowIndex As Integer)
''' <summary>
''' Load data from the dataset and show on DatagridView
''' </summary>
Public Overridable Sub ShowData()
End Sub
Public Overridable Sub SetNumRowPerPage()
End Sub
Public Overridable Function GetRowsSelected() As DataSet
End Function
Public Overridable Sub BindToDataset()
End Sub
Public Overridable Function GetSelectedQuoteID() As String
End Function
Public Overridable Function GetSelectedQuoteIDs() As String()
End Function
Private Overridable Sub TurnOnHighLightAtRow()
End Sub
Private Overridable Sub TurnOffHighLightAtRow()
End Sub
Private Sub VancoDataGridView_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.SelectedIndexChanged
RaiseEvent onSelectQuote(Me.SelectedIndex, Me.SelectedIndex)
End Sub
End Class
According to our testing, we believe that the problem has been fixed. Please advance to the latest release. You can download the latest release at: http://www.visual-paradigm.com/download/
I created the project in VP 5.3 that can’t generate parameters for methods and then I used VP 6.0 to open the Project. Result is : the problem is still there (There may be an affect in converting from old version to new version) !
Note: Although VP 6.0 generates the code smoothly with creating new project from menu but will fail if open VP5.3 Project.