|
[Sponsors] |
March 10, 2015, 11:26 |
CCL and Perl syntax
|
#1 |
New Member
Mickael
Join Date: Apr 2013
Posts: 9
Rep Power: 13 |
Hello,
I am currently using CCL and Perl to make a post treatment file. I would like to know if someone already managed to used CCL syntax inside a perl .pm file (library file). To explain a little more, when i am writting my .pm file i can't use !, So how i show CFX that some commands are CCL. Here is an example : ************************************************ package Cfx; use strict; use Exporter qw(import); our $VERSION = 1.00; our @ISA = qw(Exporter); our @EXPORT = (); our @EXPORT_OK = qw(PointXYZ); our %EXPORT_TAGS = ( DEFAULT => [qw(&PointXYZ)], All => [qw(&PointXYZ)]); COMMAND FILE: CFX Post Version = 14.5 END sub PointXYZ{ my ($s_dom,$s_x,$s_y,$s_z,$s_unit,$s_name)=@_; # Subroutine Input my ($r_name); # ------------Variable Initialization-----------------------------------------------------------------------------------------------------# $r_name=""; # -----------------------------------------------------------------------------------------------------------------------------------------# POINT:Point $s_name Apply Instancing Transform = On Colour = 1, 1, 0 Domain List = $s_dom Line Width = 2 Option = XYZ Point = $s_x $s_unit, $s_y $s_unit, $s_z $s_unit; Point Symbol = Crosshair Range = Global Specular Lighting = On Surface Drawing = Smooth Shading; Symbol Size = 0.07 Transparency = 0.0 END; $r_name="/POINT:Point $s_name"; #/ return($r_name); } 1; ****************************************** As soon as i add CFX command (CCL) like POINT... my code stop working, however if i removed any CFX line and make just "print" things, my library works. So,if someone find a solution to mix perl and CFX language let me know. Thank you |
|
March 10, 2015, 11:37 |
|
#2 |
Senior Member
Join Date: Jun 2009
Posts: 1,880
Rep Power: 33 |
Have you looked in the installation directory for CFD-Post session file examples ? They are suffixed .cse (Cfx SEssion)
They are worth a fortune if you are interested in Perl+CCL Last edited by Opaque; March 10, 2015 at 18:43. |
|
March 11, 2015, 14:51 |
|
#3 |
Senior Member
Edmund Singer P.E.
Join Date: Aug 2010
Location: Minneapolis, MN
Posts: 511
Rep Power: 21 |
Why do you have ; on END and Point = $s_x $s_unit, $s_y $s_unit, $s_z $s_unit
Those are CFX commands, not Perl |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
CCL CFD post: use of common perl function | Leackim | CFX | 1 | January 23, 2017 09:37 |
Access to arrays of variables with CCL or perl in command editor | omidiut | CFX | 2 | October 18, 2011 06:13 |
Perl script for intialisation | pratik mehta | CFX | 2 | September 10, 2008 04:09 |
CFX5Post error in batch mode with Perl | windhair | CFX | 2 | March 20, 2007 06:41 |
Time-steps via Perl in CCL | Rui | CFX | 5 | March 29, 2004 01:47 |