Moldflow Insight Forum
Welcome to Autodesk’s Moldflow Insight Forums. Share your knowledge, ask questions, and explore popular Moldflow Insight topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Thickness diagnostic as a result for MoldFlow Communicator review

20 REPLIES 20
SOLVED
Reply
Message 1 of 21
HugoHerrera7042
5080 Views, 20 Replies

Thickness diagnostic as a result for MoldFlow Communicator review

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

20 REPLIES 20
Message 2 of 21

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.

Message 3 of 21

thanks!! but here's a question though,

 

where am i supposed to copy/paste all of this script into???

Message 4 of 21

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.

 

 

Message 5 of 21

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!

Message 6 of 21
changing
in reply to: HugoHerrera7042

Very useful!

Message 7 of 21

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.

Message 8 of 21

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....

Message 9 of 21
JCourter
in reply to: HugoHerrera7042

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.



Justin Courter
Premium Services Specialist
Premium Support Services
Autodesk, Inc.
Message 10 of 21
morokoshi
in reply to: HugoHerrera7042

 

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 !

Message 11 of 21
pk_vel
in reply to: morokoshi

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

Message 12 of 21
thakua2
in reply to: HugoHerrera7042

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 attachedmesh_thickness_plot.bmp

Can any one help!

Thanks

 

 

Message 13 of 21
mayur_dhumal
in reply to: thakua2

Hi Aritra,

The VBScript interpreter (cscript.exe/wscript.exe) comes in two flavors on a 64-bit version of Windows: a 32-bit version and a 64-bit version.

The 32-bit version can create and use 32-bit COM components only, and the 64-bit version can create and use only 64-bit COM components.

By default, *.vbs files are associated with the 64-bit version. You COM component is most likely a 32-bit one, hence the error.

You can find the 32-bit version in the %windir%\SysWOW64 folder. Launching this version should give you access to all 32-bit COM components:

%windir%\SysWOW64\wscript.exe

or

%windir%\SysWOW64\cscript.exe

So just RUN this .exe to enable 32 bit COM components.

Regards,
Mayur
Message 14 of 21
thakua2
in reply to: mayur_dhumal

Thanks a lot! Mayur!
But this might not be the case here.I checked at my end.Have you used this
macro at your end.Does it work?

--
Thanks & Regards
Aritra Thakur

--
*NOTICE: Whirlpool Corporation e-mail is for the designated recipient only
and may contain proprietary or otherwise confidential information. If you
have received this e-mail in error, please notify the sender immediately
and delete the original. Any other use or disclosure of the e-mail by you
is unauthorized.*
Message 15 of 21
mayur_dhumal
in reply to: thakua2

Hi Aritra,

I am not working in AMI2013, but this script works fine with 2015.

Regards,
Mayur
Message 16 of 21
teopado89
in reply to: morokoshi

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

Message 17 of 21
vgrover
in reply to: mayur_dhumal


@mayur_dhumal wrote:
Hi Aritra,

I am not working in AMI2013, but this script works fine with 2015.

Regards,
Mayur



 

Message 18 of 21
rpociask
in reply to: vgrover

Hi.

Anybody can add "something" to this script that it will calculate only visible entities?

Thank in advance!

Message 19 of 21
bernor_mf
in reply to: rpociask

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

( If my comments are accepted, provide "Kudos" as appreciation. If your request is answered/resolved, please click the "Accept as Solution" button. Thanks.)
Message 20 of 21
nbhoopat
in reply to: HugoHerrera7042

 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

 

 

Thanks in advance
Arvind B

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

Post to forums  

Autodesk Design & Make Report