Hi,
I've in the most cases several setups for one workpiece. If I use the Setup Sheet button, I get at every setup an html file with the same name ("name of workpiece".html). How i can modify the setup-sheet.cps to change the resulting file name in the "setup name".html?
regard
Frank
Hello Frank,
As you know currently you cannot create separate output files when running a single instance of a post, but you can post each setup separately, allowing you to specify a separate file for each setup. You accomplish this by right clicking on the setup you want to post for and then selecting the Post Process menu. You will see the standard post dialog and can enter a different filename here.
Let me know if this solution works for you.
Hi bob.schultz,
the trivial solution by post process is known to me. But this is not a good solution for me. What does it mean "a single instance of a post"? I have a few picture taken in order to clarify the whole process.
At first I click the button "setup sheet" (one of the red arrow).
I have to choose the destination folder and I get an *.html file. The Name of html is the same of the Inventor file.
And if I repeat with the next setup, is the previously generated *.html file overwritten.
That is the reason why I want to modify the setup-sheet file so that it is not the Inventor file name is used.
Hello Frank,
For a "single instance of a post" I mean each time you run the post. So if you run the post against all setups, then a single setup sheet will be created for all setups. If you post for a single setup, then only that setup will be output to the setup sheet.
When you run the post, you are able to change the filename that is created. You actually have two chances to change this name. The first is in the Post Process dialog, in the "Program name or number" field. The second chance is after pressing the OK button in this dialog you will be shown a browser with the selected filename and file extension of ".html". You can change the name here also. I am attaching 2 pictures that show these examples.
If you post against each setup individually then you can assign a new name to the output files.
The pictures that you attached are too small for me to see any detail on them.
Please let me know if this is a valid solution for you. If not, then I'll look further into your request.
You can make the setup sheet output a new file, so in theory it should be possible to make it run the setup sheet for each setup when you select them all right?
Laurens Wijnschenk
3DTechDraw
AutoDesk CAM user & Post editor.
René for Legend.
Hi,
again, the trivial solution by post process is known to me! And I use normally one setup for one setup sheet. Because I have to change the viewport.
I do not want to use the post process button, but the setup sheet button (Einstellbatt). You could omit the button otherwise.
Is there a way to modify the setup-sheet.cps so that automatically the setup name is used as filename? Or it opens a dialog field to change the name of the generated html file?
Normally the "Einstellbatt" button will ask for the folder and overwrites without asking an existing file.
Hi Frank
I had the same problem a couple month ago and I've modified setup sheets to my needs.
Here is a copy of the stock setupsheet with only the modification for what you need (I think)
with this setupsheet, it rename the .html file to the name of the setup name, it also rename model image and tools image and save it to your parts folder on the hard drive.
If you select multiple setup, it will take the name of the first setup selected.
try it at your own risk (it work for me)
You need to have save your part file once before creating the setupsheet so the post know where is the part location on the harddrive.
if you want to add it to your setupsheet simply search "by PA" and you can copy paste what I've done
Sorry for the confusion, I did not realize that you did not want to use the Post Process menu to create the setup sheet. The modified "setup-sheet.cps" file posted by parobillard appears to match your requirements. If you would like the output setup sheet to be placed in your designated folder instead of the model folder you can make the following simple change at line 74 in the parobillard supplied cps file.
// newOutputFolder = hasParameter("document-path") ? FileSystem.getFolderPath(getParameter("document-path")) : oldOutputFolder;
newOutputFolder = oldOutputFolder;
I am also attaching an updated version of the parobillard setup-sheet.cps file that modifies the newOutputInit function so that it will work with HSMWorks, which does not seem to supply the "job-description" parameter.
@parobillard and @bob.schultz it works!
I have a small question to the file. If i use it, at the end it opens the Posteditor with a log file. How can I suppress this?
best regards
Frank
The log file is opened because the html file that HSM created was moved and it could not find it to display it. Unlike the Post Process button, the Setup Sheet button does not give you the option of not viewing the output file. You can change the following line in the newOutput function to "copy" the file instead of moving it.
From:
FileSystem.moveFile(getOutputPath(),FileSystem.getCombinedPath(newOutputFolder,newOutputName + ".html"));
Change to:
FileSystem.copyFile(getOutputPath(),FileSystem.getCombinedPath(newOutputFolder,newOutputName + ".html"));
This will create a copy of the html file and leave the original file so that HSM can display it. A drawback is when your browser comes up it will display both setup sheets. If you are leaving the .html file in the folder that is specified from within HSM (as previously mentioned in this thread), you can then comment out the following line in the newOutput function to not display the setup-name.html file, since it is identical to the file created by HSM. You will still see the setup-sheet in the browser, but it will have the old filename.
// executeNoWait(FileSystem.getCombinedPath(newOutputFolder,newOutputName + ".html"),"",false,"");
If you comment out this line and move the html file to the Part folder, then the html page displayed will not contain any pictures.
Another drawback to this suggestion is that you will have 2 copies of the .html file with different names. This is the only solution that I can think of to omit the .log file from being displayed in the editor when you use the Setup Sheet button to create the setup-sheet. I will leave it up to you on whether you want to see the log file or you want to have 2 copies of the html file.
Can't find what you're looking for? Ask the community or share your knowledge.