Skip to main content
1-Visitor
December 8, 2017
Solved

Iterate through drawing Table using Jlink

  • December 8, 2017
  • 1 reply
  • 1558 views

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

Best answer by 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 

1 reply

ddhini1-VisitorAuthorAnswer
1-Visitor
December 8, 2017
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