This is an example of a session file that will create a fem model, make 4 groups and assign colors to them.
1 | uil_file_new.go( "C:\Program Files\MSC.Software\Patran_x64\2020/template.db" , @ |
2 | "C:\project\wordpress\ex260\ex260.db" ) |
3 | set_current_dir( "C:\project\wordpress\ex260" ) |
4 | STRING asm_create_grid_xyz_created_ids[VIRTUAL] |
5 | asm_const_grid_xyz( "1" , "[0 0 0]" , "Coord 0" , asm_create_grid_xyz_created_ids ) |
7 | asm_const_grid_xyz( "2" , "[10 0 0]" , "Coord 0" , @ |
8 | asm_create_grid_xyz_created_ids ) |
10 | asm_const_grid_xyz( "3" , "[10 10 0]" , "Coord 0" , @ |
11 | asm_create_grid_xyz_created_ids ) |
13 | asm_const_grid_xyz( "4" , "[0 10 0]" , "Coord 0" , @ |
14 | asm_create_grid_xyz_created_ids ) |
16 | STRING asm_line_2point_created_ids[VIRTUAL] |
17 | asm_const_line_2point( "1" , "Point 1" , "Point 2" , 0 , "", 50. , 1 , @ |
18 | asm_line_2point_created_ids ) |
20 | asm_const_line_2point( "2" , "Point 2" , "Point 3" , 0 , "", 50. , 1 , @ |
21 | asm_line_2point_created_ids ) |
23 | asm_const_line_2point( "3" , "Point 3" , "Point 4" , 0 , "", 50. , 1 , @ |
24 | asm_line_2point_created_ids ) |
26 | asm_const_line_2point( "4" , "Point 4" , "Point 1" , 0 , "", 50. , 1 , @ |
27 | asm_line_2point_created_ids ) |
29 | STRING sgm_surface_2curve_created_ids[VIRTUAL] |
30 | sgm_const_surface_2curve( "1" , "Curve 1" , "Curve 3" , @ |
31 | sgm_surface_2curve_created_ids ) |
33 | uil_toolbar.shaded_smooth( ) |
34 | ui_exec_function( "mesh_seed_display_mgr" , "init" ) |
35 | INTEGER fem_create_mesh_surfa_num_nodes |
36 | INTEGER fem_create_mesh_surfa_num_elems |
37 | STRING fem_create_mesh_s_nodes_created[VIRTUAL] |
38 | STRING fem_create_mesh_s_elems_created[VIRTUAL] |
39 | fem_create_mesh_surf_4( "IsoMesh" , 49152 , "Surface 1" , 1 , [ "1" ], "Quad4" , "#" , @ |
40 | "#" , "Coord 0" , "Coord 0" , fem_create_mesh_surfa_num_nodes, @ |
41 | fem_create_mesh_surfa_num_elems, fem_create_mesh_s_nodes_created, @ |
42 | fem_create_mesh_s_elems_created ) |
43 | STRING g1[ 25 ],g2[ 25 ],g3[ 25 ],g4[ 25 ] |
44 | STRING e1[ 36 ],e2[ 36 ],e3[ 36 ],e4[ 36 ] |
45 | STRING created_ids_list[VIRTUAL] |
48 | e1 = "Elm 1:5 11:15 21:25 31:35 41:45" |
50 | ga_group_current_set(g1) |
52 | list_create_target_list( "lista" , e1 ) |
53 | list_create_node_ass_elem( e1, "lista" , created_ids_list ) |
54 | list_save_group( "lista" , g1, FALSE ) |
55 | ga_group_color_set(g1, 1 ) |
57 | e2 = "Elm 6:10 16:20 26:30 36:40 46:50" |
59 | ga_group_current_set(g2) |
61 | list_create_target_list( "lista" , e2) |
62 | list_create_node_ass_elem( e2, "lista" , created_ids_list ) |
63 | list_save_group( "lista" , g2, FALSE) |
64 | ga_group_color_set(g2, 2 ) |
66 | e3 = "Elm 51:55 61:65 71:75 81:85 91:95" |
68 | ga_group_current_set(g3) |
70 | list_create_target_list( "lista" , e3) |
71 | list_create_node_ass_elem( e3, "lista" , created_ids_list ) |
72 | list_save_group( "lista" , g3, FALSE ) |
73 | ga_group_color_set(g3, 5 ) |
75 | e4 = "Elm 56:60 66:70 76:80 86:90 96:100" |
77 | ga_group_current_set(g4) |
79 | list_create_target_list( "lista" , e4) |
80 | list_create_node_ass_elem(e4, "lista" , created_ids_list) |
81 | list_save_group( "lista" , g4, FALSE) |
82 | ga_group_color_set(g4, 7 ) |
86 | uil_toolbar.shaded_smooth() |
87 | uil_toolbar.wireframe( ) |
89 | uil_imaging_bw_reverse( ) |
90 | ui_repaint_tree( TRUE ) |
91 | uil_imaging_bw_reverse( ) |
92 | ga_view_aa_set( 0. , 0. , 0. ) |
93 | uil_viewport_post_groups.posted_groups( "default_viewport" , 4 , [ "Group 1" , "Group 2" , "Group 3" , "Group 4" ] ) |
94 | uil_primary_file.db_save( ) |

Like this:
Like Loading...
Related
Recent Comments