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

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

Iterate through drawing Table using Jlink

ddhini
14-Alexandrite

Iterate through drawing Table using Jlink

I need to extract all the data inside the table from the drawing sheet  ,for that i iterate over the rows and columns of the respected table as following.

 

Table bomtab=drw.GetTable(0);//get table
int col=bomtab.GetColumnCount();
int row=bomtab.GetRowCount();
 for(int i=1;i<=row;i++){
   for(int j=1;j<=col;j++){
      TableCell cell = pfcTable.TableCell_Create (i, j);
      DetailNoteItem note = (DetailNoteItem) bomtab.GetCellNote(cell);
      DetailNoteInstructions dni = note.GetInstructions(true);
      DetailTextLines dtln = dni.GetTextLines();
	for (int l = 0; l < dtln.getarraysize(); l++) {
		//detail test
		DetailTexts dts = dtln.get(l).GetTexts();
	             for (int K = 0; K < dts.getarraysize(); K++) {
			DetailText dt = dts.get(K);
			System.out.println(dt.getText().toString());				       
		    }
	}
    }						
}

The code extracts the values of the table ,but the table cells are parametrised so it not gives the exact string value instead its giving &asm.mbr.name likewise .please guide me to solve my issue .

 

Thanks Regards,

Dinesh

1 ACCEPTED SOLUTION

Accepted Solutions
ddhini
14-Alexandrite
(To:ddhini)

stringseq lines = bomtab.GetText(cell, ParamMode.DWGTABLE_NORMAL); // throws error when cell is empt

By simply doing this we can extract the Cell value .

 

Thanks Regards,

Dinesh 

View solution in original post

1 REPLY 1
ddhini
14-Alexandrite
(To:ddhini)

stringseq lines = bomtab.GetText(cell, ParamMode.DWGTABLE_NORMAL); // throws error when cell is empt

By simply doing this we can extract the Cell value .

 

Thanks Regards,

Dinesh 

Top Tags