asfenfriend.blogg.se

Catia v5 training manuals pdf
Catia v5 training manuals pdf









catia v5 training manuals pdf

To enter your first program line, double-click the cmdOK control, and type: lblText.Caption = "My first VB/VBA program" Note the ‘Completion’ help Inform the (Name) property of each control: lblText cmdOKĬmdQuit Inform the Caption property: «My first …» (for lblText) « PLM University» (for Userform1) « OK » (for cmdOK) « Quit » (for cmdQuit) VBA Editor is started Right-click on the Project, and insert a window (UserForm)

catia v5 training manuals pdf

Select a directory and filename for this VBA project Tools/Macro/Macros Macro libraries … Select VBA Project, then Create new library Then enter the path and name of the project. In this exercise you will create a VBA project, including a label and two command buttons.

catia v5 training manuals pdf

For example " The external diameter is " + Ext_Diam + "." To concatenate string of characters, use the « + » character. Some help: Invariable string of characters have to be written between double quotes “ ’’. … to assign this reference to the filename For example, «washer_10_5» instead of « washer ». Then, modify the macro … … to get a washer reference according to the two diameters. Create a CATPart, which reference is ‘Washer’ Open a sketch, and create two concentric circlesĮxit the sketcher, and create a pad to get a 1mm-width washer Save the part on your desktopīelow the Sub CATMain() line, add the following lines which will ask the user for two parameters Ext_Diam = inputbox("Enter the external diameter") Int_Diam = inputbox("Enter the intenal diameter ") Look for the circle creation lines, and replace (and adapt if necessary) the fixed values by the Ext_Diam and Int_Diam variables Start recording a new Macro in Tools menu. Then, we will modify the resulting macro to ask user for entering the external and internal diameters. In this step you will record the creation of a washer. Recorded macros need to be reorganized and commented for easy maintenance. Recording a macro can help you programming. To test the modified macro, delete the pad and the sketch and run the macro. Replace the x values by the ‘X’ variable. Search for the creation of the point and the circle. Dim DimarrayOfVariantOfDouble1(8)‘ arrayOfVariantOfDouble1(8)‘Put Putititout outof ofthe theloop loop X=0 X=0 For ForI=1 I=1to to55 Dim DimSketch1 Sketch1As AsSketch Sketch Set Sketch1 = sketches1.Add(reference1) Set Sketch1 = sketches1.Add(reference1) Take the declaration of the array out of the loop. A new pad should be displayed.Įdit the Macro and begin a loop just before the creation of the sketch. To test it, delete the previous pad and sketch and run the macro. Don’t use numerical values to avoid creating constraints inside the sketch.Įxit from the Sketcher Create a Pad with a Height of 50mm Stop recording. The icon “Stop recording” will appear.Ĭreate a new Sketch in plane XY Create a circle centered at (50,50) with a radius of 50. Start recording a new Macro in Tools menu.Ĭhoose “External file” and Start. Start CATIA and create a new Part in Part Design. (except if the mistakes are undone using the Undo icon) If you make any mistakes, they will be recorded in the macro. For this exercise, be careful to record the macro in “one shot”. Then, we will modify the resulting macro to create several cylinders in the same time. In this step you will record the creation of a pad (cylinder). Introduction Added Exercise Presentation Added Exercise: Decoding 3D Features Added Exercise: Easy Chess Added Exercise: InOut BOM Added Exercise: Insert Bolt Added Exercise: Printing Drawing Sheets Added Exercise: Test Tolerances Master Exercise: Crankshaft Design Intent Design Process Recap Exercise: Testing Selections using Scripts Recap Exercise: Macro to select elements Do It Yourself Table of Contents (2/2) Recap Exercise: Drafting a Bolt using Script Do It Yourself Recap Exercise: Scripting 3d Wireframes and Surfaces Copyright DASSAULT SYSTEMES Recap Exercise: Scripting Part Design Features Do It Yourself Recap Exercise: Creating 2d Sketch with Constraints Do It Yourself Recap Exercise: Modifying View point of a Document Do It Yourself Recap Exercise: Using standard VBA / VB Controls Do It Yourself Recap Exercise: My First VBA Project Do It Yourself Recap Exercise: Recording of Creation of a Washer Do It Yourself Table of Contents (1/2) Recap Exercise: Recording a Macro Do It Yourself Version 5 Release 19 January 2009 EDU_CAT_EN_VBA_AX_V5R19











Catia v5 training manuals pdf