AVIS0202
Automotive
- Mar 27, 2017
- 7
hi this i s my coding to create a design table
Sub CATMain()
' declaring parameter
Dim par As Parameters
Set par = CATIA.ActiveDocument.Part.Parameters
' declaring the dimensions
Dim di1, di2, di3 As Dimension
Set di1 = par.CreateDimension("length", "length", 100)
Set di2 = par.CreateDimension("breath", "length", 25)
Set di3 = par.CreateDimension("heigth", "length", 58)
' assign formula
Dim rel As Relations
Set rel = CATIA.ActiveDocument.Part.Relations
' declare variables in relations
Dim ktab As DesignTable
[highlight ] Dim knam, des, path As CATBSTR[/highlight]
Set knam = "flat steel design table"
Set des = "dimensions of company standards"
Set path = "C:\Users\skaliyap\Desktop.txt"
Set ktab = rel.CreateDesignTable(knam, des, False, path)
' link parameters
ktab.AddAssociation di1, "length"
ktab.AddAssociation di2, "breath"
ktab.AddAssociation di3, "heigth"
End Sub
the thing is that im unable to execute because the highlighted line in the coding with CATBSTR shows as compile error
i have also checked all available references but unable to clear my error...
error
compile error
user-defined type not defined
Sub CATMain()
' declaring parameter
Dim par As Parameters
Set par = CATIA.ActiveDocument.Part.Parameters
' declaring the dimensions
Dim di1, di2, di3 As Dimension
Set di1 = par.CreateDimension("length", "length", 100)
Set di2 = par.CreateDimension("breath", "length", 25)
Set di3 = par.CreateDimension("heigth", "length", 58)
' assign formula
Dim rel As Relations
Set rel = CATIA.ActiveDocument.Part.Relations
' declare variables in relations
Dim ktab As DesignTable
[highlight ] Dim knam, des, path As CATBSTR[/highlight]
Set knam = "flat steel design table"
Set des = "dimensions of company standards"
Set path = "C:\Users\skaliyap\Desktop.txt"
Set ktab = rel.CreateDesignTable(knam, des, False, path)
' link parameters
ktab.AddAssociation di1, "length"
ktab.AddAssociation di2, "breath"
ktab.AddAssociation di3, "heigth"
End Sub
the thing is that im unable to execute because the highlighted line in the coding with CATBSTR shows as compile error
i have also checked all available references but unable to clear my error...
error
compile error
user-defined type not defined