Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X
I have an assembly with a component that has a component which has a Coordinate System Point defined.
I am trying to read and export the dimensions of the point to a text file with JLink.
I have followed the instructions of the example in Creoview 2.0, which gives something like this:
public static void writeDatumPointFeatureProperties(Feature feat) {
try {
DatumPointFeat pointfeat = (DatumPointFeat)feat;
String datumpointfeatname = (pointfeat.GetFeatName());
if (points == null)
printMsg (" - No General Datum Points (null)");
else if (points.getarraysize() < 0)
printMsg (" - No General Datum Points");
else {
printMsg (" - No of points = " +points.getarraysize() );
for (int j = 0 ; j< points.getarraysize() ; j++) {
... and so on
My problem is that I always get points.getarraysize() = 0, so I cannot go on.
How can I do this?
Best regards
Daniel
Hi all,
Daniel, you could not get non-zero value from points.getarraysize() because you had never added point elements to the 'points' array.
You are missing a call to GetPoints() method: GeneralDatumPoints points = pointfeat.GetPoints(); or something similar. It is strange that you had been able to compile this code because 'points' variable had not been declared in method's scope...
Feliks.