Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating spline's and adding points using Cat Script

Status
Not open for further replies.

greg21

New member
Feb 18, 2003
7
0
0
GB
Does anyone know anywhere where I can get any help on writig catscript files,
i'm basicaly trying to creat a spline through an number of points using a set of parameters to create the coordinates.
Thus when the number of points on the spline is altered a spline is created with that number of points as the controls, but i need to be able to add or remove points from the spline using the catscript programe aswell, i have found functions that allow this but do not know how to use them any help would be greatfully recieved, possibly with a pint of teh local finest
tar very much
 
Replies continue below

Recommended for you

As a beginner in the matter, I can only provide you with a few elements of the definite answer:

1- In the sketcher, start the Macro recorder.
2- Insert all of your points.
3- Draw the spline.
4- Stop the recorder.
5- Check the code it generated.
You now have the basics of spline generation, as well as all of the required instruction for creating points.

For the programming itself (Input boxes, if-then-else statements, for-next loops, etc), have a look at some Visual Basic documentation: Catscript looks like it is based on it. You might find useful information in the VB documentation that comes with Excel, Word and Access. Any VB programming reference manual should contain the information you are looking for.

Good luck :)
 
pmayer,
I'm using V5R9 under XP Pro and trying to follow your method of using macros.
Start recording, construct spline, stop recording and look at the macro with Edit and all I've got is the VB header and footer as shown ;
Sub CATMain()

End Sub
The code I expext to see in between these two lines is not there. Any idea what is causing this ?
 
Deriv,

I have had the same problem a number of times, and unfortunately have not found out why it happens or any way to solve it.

It appears to be the same for a number of other process too, as if Catia can not see exactly what you are doing interactivly thus can not convert it into script. If anyone has a solution to this it would be great.
 
Status
Not open for further replies.
Back
Top