Open Source Sofware

» Topic: Return Multiple Lines (Post – Program Block)

Home New Forums BobCAD-CAM Forums Return Multiple Lines (Post – Program Block)

This topic contains 1 reply, has 2 voices, and was last updated by  Sean 2 years, 7 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #17419

    Brad
    Participant

    Good Evening,

    I’m working with the Program Block Scripting and can’t figure out how to have line breaks.
    Here is an example:

    2003. Program Block 3 - Output PartsList
    	Dim PartSpacing
    	PartSpacing = MILL_GetUserEditRealSettingsVariable(4) 
    	'MsgBox(PartSpacing)
    	Dim PartListOutput
    	PartListOutput = "N1001 x-"& PartSpacing * 1  & 
    			 "N1002 x-"& PartSpacing * 2 &
                             "N1003 x-"& PartSpacing * 3
    	Mill_SetReturnString(PartListOutput)

    And I would like it to post at Program_Block_3:
    N1001 x-3.3
    N1002 x-6.6
    N1003 x-9.9

    I guess I could enter each line as a seperate Program Block.. But that’s silly.

    Any ideas? Thanks

    #17812

    Sean
    Participant

    This would require a modification to the script. I have updated it to show how this should work.

    2003. Program Block 3 – Output PartsList
    Dim PartSpacing
    PartSpacing =MILL_GetUserEditRealSettingsVariable(4)
    ‘MsgBox(PartSpacing)
    Dim PartListOutput1
    Dim PartListOutput2
    Dim PartListOutput3
    PartListOutput1 = “N1001 x-”& PartSpacing * 1 &
    PartListOutput2 = “N1002 x-”& PartSpacing * 2 &
    PartListOutput2 = “N1003 x-”& PartSpacing * 3
    Mill_SetReturnString(PartListOutput1)
    Mill_SetReturnString(PartListOutput2)
    Mill_SetReturnString(PartListOutput3)

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

Forum Account

     Lost Password / Register   

Sharing

facebooktwittergoogle_pluspinterestlinkedinmail