Hi All,
I am struggling with three problems. I am writing the script for catia part modeling.
1. How can i assign strParam1 the current material
2. How can i assign strParam2 the current mass
3. How can i assign strParam6 the current date of the system
The program is below:
Sub CATMain()
Dim productDocument1 As Document
Set productDocument1 = CATIA.ActiveDocument
Dim product1 As Product
Set product1 = productDocument1.Product
Dim parameters1 As Parameters
Set parameters1 = product1.UserRefProperties
Dim strParam1 As StrParam
Set strParam1 = parameters1.CreateString("Material", "")
strparam1.valuatefromstring ""
Set strParam2 = parameters1.CreateString("Mass", "")
strparam2.valuatefromstring ""
Set strParam3 = parameters1.CreateString("Drawn by", "")
strparam3.valuatefromstring ""
Set strParam4 = parameters1.CreateString("Checked by", "")
strparam4.valuatefromstring ""
Set strParam5 = parameters1.CreateString("Approved by", "")
strparam5.valuatefromstring ""
Set strParam6 = parameters1.CreateString("Drawn Date", "")
strparam6.valuatefromstring ""
strParam1.value=
strParam2.value=
strparam6.value= ""
End
What i want is that these parameters should pick up the data automatically, not filling them manually.
Your help is of high importance to me.
I am struggling with three problems. I am writing the script for catia part modeling.
1. How can i assign strParam1 the current material
2. How can i assign strParam2 the current mass
3. How can i assign strParam6 the current date of the system
The program is below:
Sub CATMain()
Dim productDocument1 As Document
Set productDocument1 = CATIA.ActiveDocument
Dim product1 As Product
Set product1 = productDocument1.Product
Dim parameters1 As Parameters
Set parameters1 = product1.UserRefProperties
Dim strParam1 As StrParam
Set strParam1 = parameters1.CreateString("Material", "")
strparam1.valuatefromstring ""
Set strParam2 = parameters1.CreateString("Mass", "")
strparam2.valuatefromstring ""
Set strParam3 = parameters1.CreateString("Drawn by", "")
strparam3.valuatefromstring ""
Set strParam4 = parameters1.CreateString("Checked by", "")
strparam4.valuatefromstring ""
Set strParam5 = parameters1.CreateString("Approved by", "")
strparam5.valuatefromstring ""
Set strParam6 = parameters1.CreateString("Drawn Date", "")
strparam6.valuatefromstring ""
strParam1.value=
strParam2.value=
strparam6.value= ""
End
What i want is that these parameters should pick up the data automatically, not filling them manually.
Your help is of high importance to me.