• Arbrtext IsoDraw, Perl

    Posted on May 25th, 2009

    Written by douglaspaulwade

    Tags

    Running a Perl script from inside PTC’s Arbortext IsoDraw in a Window’s CMD shell. The example below is very simple but demonstrates what can be done with Perl.

    First you will need a Perl program. I will use Hello World printed to screen as an example. Place the following code  inside a file called “hello.pl” and save it at C:\hello.pl.

    print "Hello World\n";

    Second, create a file called “hello.ism“:

    MACRO hello
    Launch "C:\WINDOWS\system32\cmd.exe" "/k c:\hello.pl"
    END MACRO

    Here is the syntax: Use the keyword Launch and the path to Window’s command shell. The switch (option) /k keeps the command window open. You can use /c to close the command window, but since we are wanting to see the results printed, we will leave the CMD shell open. Enter the full pathname and Perl file name, (e.g., c:\hello.pl)

    Place the “hello.ism” inside the Macros folder. For example, my installation is: C:\Program Files\PTC\Arbortext IsoDraw 7.0\Program\Macros”.

    Third, launch IsoDraw. Start > Program Files > PTC > Arbortext IsoDraw 7.0 > Arbortext IsoDraw 7.0

    To  launch a Perl script from a batch file (.ism), from the menu: Macros > hello.

    Hello Macro

    Hello Macro

    The script will run and print the results in an open CMD shell and print “Hello World“.

    Hello World

    Perl Results. "Hello World"

    Again, this is a simple example but it does show how to launch Perl from IsoDraw.

    This entry was posted on Monday, May 25th, 2009 at 1:09 pm and is filed under Arbrtext IsoDraw, Perl. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
  • 1 Comment

    Take a look at some of the responses we have had to this article.

    1. Alan
      Dec 15th

      For me the word perl was missing and the CMD would just open the perl file, try the following in the MACRO:

      MACRO hello
      Launch “C:\WINDOWS\system32\cmd.exe” “/k perl c:\hello.pl”
      END MACRO

  • Leave a Reply

    Let us know what you thought.

  • Name(required):

    Email(required):

    Website:

    Message: