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

J-Link or Layout Issue

Participant

J-Link or Layout Issue

Hello Gurus,


This may be a layout issue rather than a J-Link issue so I am posting in that forum as well, apologies if you recieve this thread twice.


We have recently began to play with J-LInk and have an application that reads parameter values from an XML file and inserts these values into a layout.


(XML example:
<model>T908<model>
<wheelbase>5555.0<wheelbase>
Parameter in Layout (string) MODEL, parameter value T908
Parameter in Layout (Real Number) WHEELBASE, parameter value 5555.0)


This layout has an assembly declared to it and the parameter values drive the assembly configuration.


The layout and assembly are existing, ie were created and used well before we dabbled in J-Link.


During testing of the J-Link application we have encountered a problem


The XML file is being read into the layout, but is not populating about a third of the parameter values that it should be, ie the current values in the layout remain for these parameters, they do not take the value out of the XML file.


I have checked that the parameter names are spelt identical to the XML tags in the file and they are all correct.


This process also seems to create some sort of link between the layout, assembly and the read-in XML file, in that you cannot alter and save values in the XML file after it has been read into the layout.


It will not re-read an XML file once the first one has been read in


When you try to make changes & save the XML ina text editor (have tried both wordpad and crimson editor)it comes up with an error message saying that it is being used by some other application.


Its as if there is a “link” between the XML and the Layout once the XML has been read in????


So what I did was create a couple of additional test files (layout, assembly and drawing) containing 20 parameters and including all of the parameters that were not changing in the original layout.


The XML reads in and populates all values perfectly, as it should in this test file.


The XML file is editable and can be saved and the revised XML can be re-read in and works perfectly, there does not seem to be any “link” between the XML and layout.


This leads me to believe there is an issue with the original layout but I do not know what it could be.


It is weird that it reads some of the values but not others (the faulty ones are a mixture of String and Real Number parameters)


Have any of you experienced anything like this before, do you have any suggestions as to how we may solve it?


We are on Wildfire 2 M190 and Intralink 3.3 M021


TIA


Paul Stephens
Cad Systems Supervisor
Kenworth Trucks Australia
2 REPLIES 2

J-Link or Layout Issue

I can think af these things that might be causing you these problems:

1. Parameters not set in the layout
Are these parameters driven by some relations in the layout?
Can you change their values in an interactive session? They might be
locked.
2. XML file in use
A you sure you close the file after reading it in? Java will close it
automatically when the application stops, which is when Pro/E is closed
for J-link if it is setup as a menu.

Good luck
Bjarne Frandsen



"Paul Stephens" <->
17-01-2008 01:16
Please respond to
"Paul Stephens" <->


To
-
cc

Subject
[proecus] - J-Link or Layout Issue






Hello Gurus,


This may be a layout issue rather than a J-Link issue so I am posting in
that forum as well, apologies if you recieve this thread twice.


We have recently began to play with J-LInk and have an application that
reads parameter values from an XML file and inserts these values into a
layout.

(XML example:
<model>T908</model>
<wheelbase>5555.0</wheelbase>
Parameter in Layout (string) MODEL, parameter value T908
Parameter in Layout (Real Number) WHEELBASE, parameter value 5555.0)

This layout has an assembly declared to it and the parameter values drive
the assembly configuration.


The layout and assembly are existing, ie were created and used well before
we dabbled in J-Link.


During testing of the J-Link application we have encountered a problem


The XML file is being read into the layout, but is not populating about a
third of the parameter values that it should be, ie the current values in
the layout remain for these parameters, they do not take the value out of
the XML file.


I have checked that the parameter names are spelt identical to the XML
tags in the file and they are all correct.


This process also seems to create some sort of link between the layout,
assembly and the read-in XML file, in that you cannot alter and save
values in the XML file after it has been read into the layout.


It will not re-read an XML file once the first one has been read in


When you try to make changes & save the XML in a text editor (have tried
both wordpad and crimson editor) it comes up with an error message saying
that it is being used by some other application.


Its as if there is a ?link? between the XML and the Layout once the XML
has been read in????


So what I did was create a couple of additional test files (layout,
assembly and drawing) containing 20 parameters and including all of the
parameters that were not changing in the original layout.


The XML reads in and populates all values perfectly, as it should in this
test file.


The XML file is editable and can be saved and the revised XML can be
re-read in and works perfectly, there does not seem to be any ?link?
between the XML and layout.


This leads me to believe there is an issue with the original layout but I
do not know what it could be.


It is weird that it reads some of the values but not others (the faulty
ones are a mixture of String and Real Number parameters)


Have any of you experienced anything like this before, do you have any
suggestions as to how we may solve it?


We are on Wildfire 2 M190 and Intralink 3.3 M021


TIA

Paul Stephens
Cad Systems Supervisor
Kenworth Trucks Australia
----------

RE: J-Link or Layout Issue-Summary

I did manage to fix the problem I was having.



The problem was caused by the FIFTH_WHEEL_SETTING tag value in the XML being a string and the parameter value in the layout being a real number.



The parameter also was used in a relation in the skeleton, driving a plane.



So what was happening was the values in the XML were all being read into the layout nicely until it hit FIFTH_WHEEL_SETTING in the file.



Every parameter that followed FIFTH_WHEEL_SETTING in the XML file was not changed in the layout.



The J-Link application did not get a chance to get to the "xmlLine.close();" line in the script so the XML file was being locked and could not be edited and saved.



Once I fixed the XML tag/Parameter value mis-match everything worked fine.

Thanks to everybody who replied, especially JD Felkins, Mark Steffke & Bjarne Frandsen

Replies below


Check your parameter type class. This class should determine parameter type for input. I think might be happening is that the app is not determining parameter type correctly. Look at the Real Number type.


Layouts are really a “pain” from an automation perspective, we advise customers to avoid them completely – and not just because we sell tools to do it better, but because of the hassles they create for relationships that need to be managed in PDM and broken to re-use with other layouts or when you want to lock down your released models/drawings/etc... It is best to do things as autonomous as possible.


I can think af these things that might be causing you these problems:

1. Parameters not set in the layout
Are these parameters driven by some relations in the layout?
Can you change their values in an interactive session? They might be locked.
2. XML file in use
A you sure you close the file after reading it in? Java will close it automatically when the application stops, which is when Pro/E is closed for J-link if it is setup as a menu.





Since you’re working with XML (a web content) you may have some sort of cache working against you here.

That might explain the fact you test file worked and why revisions don’t.



Just a thought

I do this type of thing with pro/toolkit, but we read our parameters from plain old text files instead of xml files. Are you sure you are closing the xml filein your j-link app before exiting.Leaving a file handle open can cause this type of thing. The only thing that comes to mind why some of the parameters may not be getting set is that you are passing the incorrect data type. Sometime I find that parameters that take number values were actually defined as strings by the user. Just a thought.You know, I always heard that there is not a function to regenerate layouts in J-Llink. Is that true?Sounds like you're doing some interensting things. Glad to see there are others out there in the pro/e world using pro/e as a configure to order system. Our system is quite complicated and we have multiple layouts,and sometimes pass over 2000 parameters for one of our units.