Scripting in Catia: Using Knowledge Patterns

Using Knowledge patterns in the way described in this tutorial allows for more of a scripting workflow within a single part. This eliminates the need for multiple part files and a catalog file.

 let vcrvs (VCrvUDF)
let i (integer)
let pt (point)
let spacing (length)
let num (length)
let ratio (real)

spacing = Vspacing

num = int(length (VCrvConstruction\Input\Line.1 )/spacing)

ratio = 1/num

for i while i < num
pt =pointoncurveRatio(VCrvConstruction\Input\Line.1 ,`00FrameworkSketch\Point.3` ,i*ratio,true)
vcrvs=CreateOrModifyTemplate(“VCrvUDF” ,VCurves ,`Relations\Knowledge Pattern.5\VCrvsList` ,i)
vcrvs.xyplane =xyplane
vcrvs.Point.7 =pt
vcrvs.MultisectionsSurface.1 =`VCrvConstruction\Input\Multi-sections Surface.1`
i = i + 1


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s