Ask and answer engineering questions

Learn from millions of experts

Missing feed

CATBSTR : compile error

By siva k on 16 May 08:44 0 answers 399 views 0 comments

i have followed a macro below where im not able to run beyond CATBSTR: which is showing me a compile error. i have selected all reference as per advice given earlier but still im getting the same.

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
Dim knam, des, path As CATBSTR

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

Add your answer to: "CATBSTR : compile error "

Save Cancel