Topic
  • 1 reply
  • Latest Post - ‏2011-05-10T19:24:39Z by SystemAdmin
Losman
Losman
1 Post

Pinned topic ReqPro RPX Interface: Creating baselines via Perl

‏2006-04-10T21:12:30Z |
We are looking to automate the creation of Baselines for projects with Perl. I have found the one Perl example that shows how to connect to ReqPro with RPX and it runs fine. I'm new to using RPX so I need some nudging in the right direction.

From the documenation it shows the creation of a BaseCompApplication and a DataDescriptor. It then proceeds to fill out properties of the DataDescriptor and then runs the Baseline manager.

My first concern is whether or not I setup/established a proper connection to the RqBaseComp.dll. My second concern is with the field properties and whether they are set correctly or not.

Any help/direction would be appreciated.
Thanks,
CR

P.S. When ran it doesn't error out but it does nothing.. :)
==============================
use Win32::OLE;

my ($RBC) = Win32::OLE->new("RqBaseComp.Application");
my ($BaseCompApp) = Win32::OLE->new("RqBaseComp.BaseCompApplication");
my ($DataDesc) = Win32::OLE->new("RqBaseComp.DataDescriptor");

$DataDesc->{"RQSFilepath"} = "C:\Temp\RPX_Testing\RPX_Testing.rqs";
$DataDesc->{"UserName"} = "admin";
$DataDesc->{"UserPassword"} = "";
$DataDesc->{"Location"} = "C:\Temp\RPX_Testing\Baselines";
$DataDesc->{"Label"} = "RPX_01";
$DataDesc->{"ElementType"} = "3";
$DataDesc->{"Traceability"} = "1";
$DataDesc->{"Discussion"} = "0";
$DataDesc->{"History"} = "1";

$BaseCompApp->CreateBaseLine($DataDesc);
==============================
Updated on 2011-05-10T19:24:39Z at 2011-05-10T19:24:39Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    741 Posts

    Re: ReqPro RPX Interface: Creating baselines via Perl

    ‏2011-05-10T19:24:39Z  
    I don't think the poster still has the problem, but I'm posting this for the sake of anybody who is unfortunate enough to have to use RPX and comes upon this post by virtue of a Google search (yup, that was my case...)
    Things to watch out when using RPX in Perl:
    1. Consistently quote path names, so they point to where you want them to point to: in the case of Losman, both the Location and the RQSFilePath properties of the data descriptor are going to cause RqCompBase to barf.
    2. Don't forget to chomp() the values you read from the prompt.
    3. Win32::OLE->LastError() is your friend.