Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X
Hi all,
Is there a way to save a Creo file without the model tree history?
I need to send a large assembly in Creo format to a client, but I don't want him to have access to the parametrization.
I know I can save as a step or igs and then convert to creo again, but I'm wondering if there is a more direct way to do this.
Thanks
Solved! Go to Solution.
Depending on the end goal... a NEUTRAL File -- disabling the Parameters and Annotations works pretty well also..
Shrinkwrap.
FILE -SAVE AS - SHRINKWRAP.
You'll need to experiment with the settings.
Depending on the end goal... a NEUTRAL File -- disabling the Parameters and Annotations works pretty well also..
I have tried both options, neutral file and shrinkwrap.
Shrinkwrap doesn't work for me because it merges all parts and asm into one solid.
I need my client to have access to all parts and asm separately.
I'm still battling with neutral file, I think it can do the job, the problem is when I open the neutral asm, it prompts a windows to import each part and I have hundreds. I'm trying to get through this.
Thanks!
Ok, I just have to unselect the option "Customize layers" when importing:
Hmm - is should only be prompting for the first import... assuming you have one (1) neutral file assembly....
You can use CREOSON pretty easy to do this and avoid some of the prompting -- there are options in CREOSON for import type. For example - this can be copy/pasted to the PlayGround and run - with modifications on your end for the file names:
let intObj = new creo.InterfaceObj();
intObj.filename = 'testasm1.neu';
intObj.type = "NEUTRAL"
intObj.new_name = "imported_asy"
intObj.import_file();
let fileObj = new creo.FileObj();
fileObj.file = "imported_asy.asm"
fileObj.display = true;
fileObj.activate = true;
fileObj.open();
If you are trying to automate the import of multiple NEUTRAL files ... you can also do this CREOSON pretty easily. But the model type of the imported feature is more important for your results. Meaning it is a good idea to know a specific model name being reimported was a part or assembly to keep things in line. Also - what to do after the import (save, etc.)
Here is a generic script that loops through each neutral file in your current working directory and imports into Creo. Again - this is not considering the type of import - just defaulting to CREOSON import new_model_type of ASM. This is a framework - not production. 🙂
function processItem(itemName) {
let intObj = new creo.InterfaceObj();
intObj.filename = itemName
intObj.type = "NEUTRAL"
intObj.new_name = itemName.split('.')[0];
return intObj.import_file();
}
function batchFiles () {
let creoObj = new creo.CreoObj();
let creosonUtilObj = new creo.CreosonUtils();
creoObj.filename = "*.neu"; // <<-- ENTER CREO FILE (*) and EXTENSION
creoObj.list_files()
.then(function (respObj) {
return creosonUtilObj.loopItems(respObj.filelist, processItem)
})
.then(function () {
alert("Finished Batching!");
})
.catch((err) => {
alert('ERROR: '+err);
});
}
// START THE BATCH PROCESS!
batchFiles();
Hope that helps.
Dave
I resolved the problem of the prompts by unselecting the option "Customize layers" when importing:".
But your code might be useful for other imports
Thanks!