Help in creating a thickness diagnostic as a User Defined Plot for MoldFlow Communicator
Does anyone know how to export as a MFR file for Communicator the actual thickness diagnostic of the part???
I know it should include some sort of User defined plot actions, but if someone knows the detailed step by step explanation, i would really appreciate it!!
thanks,
HHS
Solved! Go to Solution.
Solved by toofewfish. Go to Solution.
You need to create a custom plot for thickness. Included is a script that I received from Moldflow support a couple of years ago to create the thickness plot. Just make sure that you are only displaying the entities that you want the thickness calculated for. (Example: If you have the gates and runners displayed, they will be included in the overall thickness range)
'@
'@ DESCRIPTION
'@ Take the Standard Thickness Diagnostics Plot and convert it into a custom plot
'@
'@ SYNTAX
'@ CustomThickness
'@
'@ PARAMETERS
'@ none
'@
'@ DEPENDENCIES/LIMITATIONS
'@ Assumes a study file is open within synergy
'@ none
'@
'@ History
'@ Created DRA 9/9/2006
'@@
Option Explicit
SetLocale("en-us")
Dim Synergy
Set Synergy = CreateObject("synergy.Synergy")
Synergy.SetUnits "METRIC"
Dim DiagnosisManager, PlotManager, Viewer
Dim Elems, TH, ARPlot, Plot
' Get aspect ratio diagnostics
Set Elems = Synergy.CreateIntegerArray()
Set TH = Synergy.CreateDoubleArray()
Set DiagnosisManager = Synergy.DiagnosisManager()
DiagnosisManager.GetThicknessDiagnosis 0.0, 1000.0, Elems, TH
Set DiagnosisManager = Nothing
' Create user plot
Set PlotManager = Synergy.PlotManager()
Set ARPlot = PlotManager.CreateUserPlot()
ARPlot.SetDataType "ELDT"
ARPlot.SetName "Thickness"
ARPlot.SetDeptUnitName("mm")
ARPlot.AddScalarData 0.0, Elems, TH
ARPlot.Build
Set Viewer = Synergy.Viewer()
Set Plot = Viewer.GetActivePlot
Plot.SetNodalAveraging False
Plot.Regenerate
Once you run the script, you should have a plot that you can mark for export.
Good Luck.
thanks!! but here's a question though,
where am i supposed to copy/paste all of this script into???
If you goto your "My AMI 2011 Projects" directory (or whatever version you are running) and goto the scripts directory, you can create a "Thickness_plot.vbs" file with notepad and paste the script above into it. You then should be able to run a macro from the "Tools/Play macro menu pick.
OMG!!!
you're the man, my friend!!! thanks a LOT!
A really hard-to-imagine steps to a really simple and always-wanted customer request, MoldFlow team!
Does anyone knows why when i open my study file, and go to the VIEW menu it doesnt show any COMMAND LINE option, or when i go to TOOLS menu, it doesnt show any RUN/PLAY MACRO option...
trying to show this thickness diagnostic thingie as a result
thanks,
h.
Hi,
If you have more than one instance of Insight open, you can only run macros in the first instance that you opened. The menu items are not available in the 2nd, 3rd, etc instance of Insight that you open.
I have asked for an enhancement several times to allow macro execution in more than one window. The only reply that I get is that it has been forwarded for development...that's been over 2 years now....
The API only recognizes a single synergy window. This is why you don't see the API functions in separate windows. All the windows need to be closed and then the first opened synergy will have this functionality.
As to the reason for this, it is because the API commands are all executed in the first synergy window. So if you had the functionality of API in multiple windows, all commands would execute only in the first window. So the ability to access them in any window other than the first, was not implemented to avoid issues executing commands in an unintended window.
To implement a fix to this would require a re-work of the API and user specification of desired synergy window for execution and thus is the pre-dominant reason the timeframe for such a request has been extended.
Greetings HHS
heres how to export mesh thickness to and MFR file ...
In your non-communicator version open up the command line window ( in the ribbon interface ithe command line is under view > user interface > command line ). Then type in
calc wall_thickness:mm @DIAG:thck:min:max
where min and max indicated the thickness range you want to show on your plot.
This will generate a user defined plot called "wall_thickness" that you can tag for export to .MFR just like any other plot
enjoy !
Hello morokoshi,
Thanks its really a simple method.
Also, after getting the User defined thickness plot, we can go to Result => Plot properties => scaling (change Min and Max) mesh display (element lines) etc for better visualization. But the extended color in the scaling is not working for this case?
The other case of playing the macro with the vbs file gives the option to extend color to other elements in the scaling tab and I guess it works?
Regards
PK
Hi All,
I am trying to make a custom plot for Thickness diagnosting of DD mesh, whcih can be exported.
Any one using this script in Moldflow 2013 and above......
I tried but got error msg as attached
Can any one help!
Thanks
Hi everyone,
i was using the command:
calc wall_thickness:mm @DIAG:thck:0:6
to create a plot with the thickness diagnostic.
It works but values doesn't have the decimal comma (i don't know if it's the right name), example:
5.147mm becomes 5147mm and so on.
Do you know what i can do to fix it? (i'm using asms 2014)
thanks
@mayur_dhumal wrote:
Hi Aritra,
I am not working in AMI2013, but this script works fine with 2015.
Regards,
Mayur
Hi @rpociask
you need to replace this row:
DiagnosisManager.GetThicknessDiagnosis 0.0, 1000.0, Elems, TH
with this:
DiagnosisManager.GetThicknessDiagnosis2 0.0, 1000.0, True, Elems, TH
For GetThicknessDiagnosis2:
True = Include only visible elements in the diagnosis
False = All
API reference:
Example: This example gets visible elements information into IntArr and DoubleArr of the thickness between 1 and 3 Set DiagnosisManager = Synergy.DiagnosisManager() Set IntArr = Synergy.CreateIntegerArray() Set DoubleArr = Synergy.CreateDoubleArray() DiagnosisManager.GetThicknessDiagnosis2 1, 3, True, IntArr, DoubleArr
Hope this helps.
Regards,
Berndt
Hi
you can use this API scrips and paste in command line (Veiw- userinterface_Script) and enter make sure you change units to metric or English whatever you need
this will be a user defined results
calc "Thickness:millimeter" @diag:thck:0:2
you can change maximum value here minimum value will be calculated by software it self even you can export to communicator