Sign in to follow this  
machineimpossible

Multi line comments from Machine Group Comment

Recommended Posts

I'm working from the MPmaster.pst (2020) and I want the Machine Group comments from the input box in Mastercam to output a new comment for each end of line from the box in mastercam. For example, inside Mastercam, in the box I have:

Customer

Part

Description

Offset

Notes

 

but right now, it outputs everything on one line:

(Customer, Part, Description, Offset, Notes)

 

Is there an easy way to change this?

Share this post


Link to post
Share on other sites
1 hour ago, machineimpossible said:

I'm working from the MPmaster.pst (2020) and I want the Machine Group comments from the input box in Mastercam to output a new comment for each end of line from the box in mastercam. For example, inside Mastercam, in the box I have:

Customer

Part

Description

Offset

Notes

 

but right now, it outputs everything on one line:

(Customer, Part, Description, Offset, Notes)

 

Is there an easy way to change this?

You could use a special ASCII character as the "break point", and use the "break string" function to break the lines at the character. Look at the string manipulation functions in the MP Post Guide.

Share this post


Link to post
Share on other sites

Not having much success with the brksps function in the post. But now I realize that if a manual entry is the very first operation in the tree, it will post in the header section, so I'll just put what would be in my Machine Group comments there. 

  • Like 2

Share this post


Link to post
Share on other sites

You will notice, that by having the 'comment$' command variable inside 'pheader$', that the Operation Comment for your 2nd Operation (following Manual Entry), will get 'dumped' with that Manual Entry info.

This is due to the way comments are "internally buffered". When 'comment$' is read, all the strings stored in the comment buffer are fed line-by-line, through 'pcomment$'. (Technically, we then process them in the user-defined Post Block 'pcomment2'.)

I have covered the process of adding a flag variable to track "header processing". While you are inside the Header, you detect and save any 1008 comments, for later output. (Inside 'psof$'.) Then, in 'psof$', you set the flag variable so that 1008 comments process like normal. 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

Join us!

eMastercam - your online source for all things Mastercam.

Together, we are the strongest Mastercam community on the web with over 56,000 members, and our online store offers a wide selection of training materials for all applications and skill levels.

Follow us