Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X
We have some very large assemblies with roughly 30 to 50 thousand parts in them. We manage these with simplified reps, mostly a first level or empty rep. So a user never opens the master up, it would crash Creo. So I am looking for a way to run mass properties on a master I can not open, (because it will crash Creo).
Some ideas I have are to run the model with first level only components turned on, everything else excluded. This works but only gives me the active level.
mp_calc_level all_models
Specifies the level of mass properties calculation.
assembly_only, all_models
assembly_only
esr_mass_properties extended
Defines whether to include all immediate components of external simplified rep into Mass Properties calculations or only defined state of design assembly.
design_only, extended
force_upd_assem_mp_in_simp_rep no
force_upd_assem_mp_in_simp_rep
Update mass properties parameters even when some of the components of the assembly are not in master rep.
yes, no, use_stored
mass_property_calculate automatic
mass_property_calculate
Calculate mass properties upon regeneration, upon save or by user request
automatic, by_request, check_upon_save
by_request
The model might need to open in a batch or no-visual mode so it can open.
Script, JLink or Toolkit not an option.
Thoughts or suggestions?
Hello Scottb Milliman
l have just a tip for you. What about BOM table with your specific parameters?
See what l think:
- create new, empty assembly drawing
- create BOM table als you wish (fill in your paremeters and etc.)
- put BOM table into your empty assembly drawing
- CHANGE BOM TABLE "SOURCE ASSEMBLY" (see following picture)
RESULT:
A) Have BOM table with all desired parameters.
B) Have master assembly in session and can work with it.
C) DON´T HAVE TO open master assembly in graphics are (dont have to see it)
D) DON´T HAVE TO put assembly in drawing.
Hope it can helps or at least give you some idea...
Regards
Milan
Guess I should have added that part as well. I have a bom table that will give me the correct information I need.
I also have added some parameters to the bom table that shows when you do Bill of material in assembly mode.
But the catch here is still the driving assembly, it you do empty you get nothing, to get a bom, you need at least the first level components to be master.
I tried your suggested, menu picks are slightly different than you show. But it still grabs the assembly and regenerates the model. It took 9 minutes to regenerate to model (small model) and update the bom. Which already had the first level components showing.
The main question sounds simple enough.
Create a bom structure with required models, run mass props, export out results. Then the user would be able to identify that the COG is at the front of the model now instead of the back.
I'm very interested in this thread. We have the same mass props problem on some models. So if you have a simplified rep with the 1st level included, it will give you the correct mass props on the repeat region?
The mass that drives my table and I would assume others, is driven from a parameter that is created when you run mass. PRO_MP_MASS So as long as you have the component selected as master it will show you this value. If you exclude it from your bom it will not show you the part number or mass. All the components under it have already been used for the mass calculation so they are know longer needed for you to show the parameter in your table.
So to answer your question, Yes
Thanks Scott. I'll have to review the config options you mentioned too. I've had mixed results in my testing when using simplified reps and trying to get mass props.
Most of our large assemblies are open-able, so it's not to your extreme. But we intentionally use some dumb models in an effort reduce RAM and system issues.
Be very careful using PRO_MP_MASS. That value is only a snapshot in time. If a user changes the geometry that value does not get updated until you run the mass property report from file-> Prepare -> Model Properties -> Mass Properties -> Change -> generate report. It will also update if you have mass_property_calculate automatic but this only works if you are not working in a PDM environment as you will likely have released models that can't be modified to be updated.
If you are using the Analysis -> Mass Properties and you have mp_calc_level all_models set be aware that despite the wording "all_models" not all models are returned. PTC says that if any components have a mass of 0 then it is working to specification to simply leave them out of the report
Also I have opened SPR 4696442 because there are other models that should be reported for Analysis -> Mass Properties that do not. That SPR has been opened since August of 2015 with no activity.
I created a script to dump the mass properties data into Excel and it was / is extremely frustrating to work with the way PTC has implemented their mass properties reporting.
Consider voting for : Create a report for mass and CG of all components in subassemblies
Working with this many models you are always careful, one wrong menu pick and you are in regen wait time or you crash Creo.
I would prefer to work within Creo to get this information if at all possible. Its all their, just need a way to update and extract it.
I agree. If you figure out a way to do it, let me know. Currently I am using the Analysis -> Mass Properties and then I am saving that as a text file and parsing / reformatting it in Excel. As I mentioned though PTC doesn't include components with a mass of 0 in that report nor do they include the component level so it is frustrating to work with.
So here is what I have so far. I created a trail file, that selects working dir, opens file, runs mass properties mapkey, saves and exits.
Then I run Creo in non graphic mode
call "C:\Program Files\PTC\Creo_2\Parametric\bin\parametric.bat" "C:\home\trail_folder\toplevel.txt" -g:no_graphics
All this works great for smaller assemblies, need to test on some larger ones.
One thing I did see on one of my assemblies I tested, the mass did not update when I added more models. I have seen others comment about such so back to testing to see what I can do to fix that concern.
Great idea with trail file.
Let us know what you will discovered
Are you running Analysis -> Mass Properties or file-> Prepare -> Model Properties -> Mass Properties -> Change -> generate report?
Interesting, the long process updates the parameter, the short does not. Now I need to fix the mapkey part of my trail file.
Thanks for the tip Christopher
So the trail files works great when I run it in Creo graphic mode. I go in edit the part number in the trail file run it non graphic, I see xtop start but it does not seem to run the trail file, then xtop ends. So that one part of it works.
Is their a way to see what it is doing in dos?
I have only run Simulate (msengine.exe) in non-graphics mode so I can't help there. I doubt there is a command prompt output though.
A thought though - when you change the part number did you test it in graphics mode? Could it be that there is just a prompt for over writing a file that you are missing?
Have you considered one of the APIs? I would have thought that at a company as big as yours you would have people generating reports like this through one of the APIs.
Yes I ran it after I changed the part number. I don't think their is any prompts, I would see those when I run it in the graphic mode. It seems to skip everything in the middle, I see xtop start and then its gone.
Guess its time to re-evaluate the trail file. Anyone got help docs on what needs to be in the trail file?
No, I have done mine using mapkeys and the graphical interface. My solution starts with prompting the user for an assembly. It then dumps the model tree and level info into a text file. After that, it runs Analysis -> Mass Properties to another text file. After that it calls Excel / VBA which marries the two data sets and formats it.
I would look into using File-> Prepare -> Mass Properties -> rather than the mass parameter. The problem with the parameter is if you have any flexible assemblies that change the geometry at the assembly level you won't capture that with the mass parameter.
File-> Prepare -> Mass Properties -> gives you the same thing as Analysis -> Mass Properties only without the bug as reported in SPR 4696442 so if you are starting from scratch, I would use File-> Prepare -> Mass Properties ->
It was a prompt that was hanging it up. Got that fixed and now it works like a champ, it does a change dir, opens file defined, and runs mass as suggested (File-> Prepare -> Mass Properties ->) dumps a m_p file in the directory, saves the model (this is for future use) and exits Creo.
Thanks for all the tips and suggestions
Applaud for you...
You have found pure, elegant solution.
Mark your answer as correct in order to help other users...
Regards
Milan
So here is my process for opening a model, running mass, saving and exiting Creo.
Start Creo - Perform action required to achieve your goal.
So this was the biggest struggle for me. We add a bunch of other stuff to our Creo, so I get countless lines in my trail file that is not needed to run the trail file in Creo. (maybe a suggestion for some docs on what line to filter out) So I would do a step, save that text out of the trail as step 1 such as below.
Step 1 of trail file
Step 2 of trail file
Step 3 of trail file
Step 4 of trail file
Step 5 of trail file
Step 6 of trail file
Now that I had all these individual trail files I could run each one to validate that they work. Remember I removed some of the un-needed text from the trail files, After I confirmed each one worked I combined them together. And again validated them to make sure they worked as planned.
Next I had to figure out how to make Creo start non-graphical, start where I wanted it, and run the trail file I wanted.
call "C:\Program Files\PTC\Creo_2\Parametric\bin\parametric.bat" "C:\home\weight\#######.txt" -g:no_graphics
After I got that to work piece by piece in dos, I created a .bat file that would run all my variables and kick of Creo. One tip here, run your Creo in graphic mode to make sure its not stopping and looking for something. This had me looking at my trail files for hours trying to figure out what went wrong. Seems Creo was looking for some files that are needed that I was not aware of.
So in the end I have a couple bat files with different part numbers that ties back to trail files that have corresponding part numbers. So if I need to run a different part number I go into the trail file and change the path in the change dir part and change the part number. Another tip here, the trail file list out the file to open twice, once as is the other with revision number. ########.asm then #######.asm.30 and I thought that I had to go in and change this as well each time I ran the file. Forgot a couple times and it ran anyway, so no need to worry about the second part number and the revision number.
The end goal, I have a model that has the mass updated, I have a #####.m_p in the folder. So in the end I can either work with the m_p file or open the assembly, create a first component level simp rep and then add my modified table to show mass and COG for all the components in the assembly.
If you have any question let me know.
Further note, next I want to figure out how in my table I can show the top level models combined weight. My table shows weight for the active models, but not a sum or total. Suggestions?
The top level mass sum is on line 6 of the m_p file. Is that what you are looking for?
Yes I get that from the m_p file, but I need a way to display that in a table. If my table would list the top level component I am sure it would show up. Need to pick the brains of the table gurus.
If by table you mean the table of components in the m_p you are out of luck. There is no way to customize that report.
If you mean you are importing the m_p report into another format (like Excel) then you need to map (VBA) line 6 of the m_p to where you want it in Excel.
No I am creating a table/repeat region in a drawing. I have a little more control of what shows for each part number this way, as long as I have a parameter for the parts. I show the weight in pounds (some still work with lbs) and level plus I can export it to a csv file.
Do you know if you can add information to the m_p file?
The only way to add or change the m_p file is to open it up in a text editor and manually change it yourself. There is no customizing that output.
Now that I understand your desire a little more I may walk back what I previously stated. File-> Prepare -> Mass Properties -> does not update the pro_mp_mass parameter. If you are using that parameter in a repeat region than you need to run file-> Prepare -> Model Properties -> Mass Properties -> Change -> generate report (or have mass_property_calculate set to 'automatic' and regen)
If you want the top level mass data in the repeat region, you could add an extra header row and include
&PRO_MP_MASS and &model_name (or &dwg_name) to it. This would get you the top assembly number and mass. Note that &PRO_MP_MASS is only going to be accurate if the parameter has been updated without any additional geometry changes. It does not automatically get updated unless you have mass_property_calculate set to automatic (which is a performance hit on every regen).
I haven't tried this, but the help pages (Creo 2) show this: