cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

doubt in weblink widfire 2 with this option pwlAssemblyComponentsGet

Highlighted
Newbie

doubt in weblink widfire 2 with this option pwlAssemblyComponentsGet

Hi folks

I have a doubt in weblink wildfire 2.

When I try to replace a component in assy using web link.

I have two component in assy they ar comp a.prt & comp b.prt
I want to replace the component b.prt with component c.prt.


The following code is given below:


//The first step followed by me was to get the information of the file
name using the below statement.



var repname="B.PRT";
var replaced="C.PRT";

var openassy =
document.pwl.pwlMdlOpen(filename,pathname,false);
var opencomp =
document.pwl.pwlMdlOpen(replaced,pathname,false);
var
cpget=document.pwl.pwlAssemblyComponentsGet (filename);
var CompID =
document.pwl.pwluIntArrayAlloc(1);


for(i=0;i<cpget.nummdls;i++)<br/> {


compname=cpget.MdlNameExt.Item(i); // at this point in wildfire 1 it
was like this the syntax : cpget.MdlNameExt[i];



if(repname.toUpperCase()==compname.toUpperCase())
{
CompID =
cpget.ComponentID.Item(i); // at this point in wildfire 1 it was like
this the syntax : cpget.ComponentID[i];

}
}
alert(filename);
alert(" component
getting replaced is:"+replaced);
alert(CompID);


var
comprepl=document.pwl.pwlAssemblyComponentReplace
(filename,replaced,parseInt(1),CompID);// my argument CompID is showing
error in the programming.
alert(comprep1);
if ( !comprepl.Status )
{

alert(comprepl.ErrorCode + "\n" +

comprepl.ErrorString + "\n" );
alert(
replaced + " could not be replaced in " + filename + ". Aborting
process" );
return;
}



if I am missing anything please let me know

how to rectify this kind of bug in wildfire 2.


Remaining things are running smooth in wildfire2 weblink.


With Regards
T.Madhava Rao

Announcements