very basic java question

very basic java question

LibertyMachine
Mentor Mentor
760 Views
3 Replies
Message 1 of 4

very basic java question

LibertyMachine
Mentor
Mentor

This is so basic I'm almost embaressed to ask this one...

I want to get 2 comments on one line:

 

%
O0001 (CSD BLOCK)
(SEE SETUP SHEET)
(LAST RUN) (UNPROVEN)
(PROGRAM BY = STM)

(6/13/2016 14:10)

 

I've done a decent amount of searching, and the best I can come up with is on seperate lines, which I'd prefer not to do.

 

Here is what I'm working with at the moment:

 

 

writeComment("SEE SETUP SHEET");
writeComment("LAST RUN")
writeComment("UNPROVEN");
writeComment("PROGRAM BY = STM")
writeComment((now.getMonth()+1) + "/" + now.getDate() + "/" + now.getFullYear() + " " + now.getHours() + ":" + ('0'+now.getMinutes()).slice(-2));


Seth Madore
Owner, Liberty Machine, Inc.
Good. Fast. Cheap. Pick two.
0 Likes
Accepted solutions (1)
761 Views
3 Replies
Replies (3)
Message 2 of 4

makko74
Collaborator
Collaborator
Accepted solution

i would use writeln:

 

writeln("(LAST RUN) (UNPROVEN)");

 

/Mario



InfoInventor CAM(Ultimate) user --- Inventor Professional 2021.2 + Inventor CAM Ultimate 8.1.2.21785
0 Likes
Message 3 of 4

Laurens-3DTechDraw
Mentor
Mentor

@makko74 wrote:

i would use writeln:

 

writeln("(LAST RUN) (UNPROVEN)");

 

/Mario


That does the trick.

The writeComment function usually is this:

function writeComment(text) {
  writeln("(" + filterText(String(text).toUpperCase(), permittedCommentChars) + ")");
}

So using the writeln is the way to go.

Laurens Wijnschenk
3DTechDraw

AutoDesk CAM user & Post editor.
Found out the hard way is the best way to win.


0 Likes
Message 4 of 4

LibertyMachine
Mentor
Mentor
Awesome, thank you!

Seth Madore
Owner, Liberty Machine, Inc.
Good. Fast. Cheap. Pick two.