Community
Fusion API and Scripts
Got a new add-in to share? Need something specialized to be scripted? Ask questions or share what you’ve discovered with the community.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Create comment linked to configurations file data

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
LearnItAlready
174 Views, 3 Replies

Create comment linked to configurations file data

I hoping to accomplish the following:

I’m trying to do is create a comment at the beginning of an NC file that refers to a specific configuration “Component Name,” “Part Number,” and “Description.” Each will have its own line of code as a comment.

 

The standard format for writing a comment that I can find is this:

/**
Output a comment.
*/
function writeComment(text) {
writeln(formatComment(text));
}
 
What is the code that links to specific configuration aspects like “Component Name,” “Part Number,” and “Description"?

I would appreciate your help very much. Thank you amazing community!
Labels (3)
3 REPLIES 3
Message 2 of 4

You can create a manual NC comment which would invoke the function writeComment() while post processing

boopathisivakumar_0-1733926934275.png

 


Boopathi Sivakumar
Senior Technology Consultant

Message 3 of 4

Thank you for your quick reply. I don't think I explained myself well enough the first time. 

 

I would like to output the Part Number into my NC file. Is there a way to do that?

 

Thanks!

Message 4 of 4

Hi,

 

The model information (components, bodies, etc) are not shared to the post-processors, and that is why their properties are not available there.

 

I think there are three ways to send information to the post-procesor:

1) With Manual NC 's commands like @boopathi.sivakumar  suggested before

2) With a custom post-property (yellow highlighted in the image below)

3) Using the "notes" parameter (red highlighted in the image below)

 

Jorge_Jaramillo_0-1733956492793.png

 

In any case you might need either set its value manually or develop a script that copies the component properties you need to it.

Then in the post-processor you need a custom modification to look for the property/parameter and to write it to the post-file with the writeComment() function.

 

Regards,

Jorge Jaramillo

 

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report