Model filename in custom report

Model filename in custom report

Anonymous
Not applicable
732 Views
4 Replies
Message 1 of 5

Model filename in custom report

Anonymous
Not applicable

Hello everyone!

I'm currently customizing the customreport.vbs, and want the model filename ex. model123.CATPart to be on the report.

Only thing I have found is the study name in the API

 

Dim StudyDoc, objShapes, Item
Set StudyDoc = Synergy.StudyDoc()
Set Item = ObjShapes.Item(1)
Item.TextFrame.TextRange.Text =StudyDoc.StudyName

Any ideas?

0 Likes
Accepted solutions (1)
733 Views
4 Replies
Replies (4)
Message 2 of 5

beth.mollica
Autodesk Support
Autodesk Support

Hi @mikael.roslund

 

Thank you for using the Autodesk Moldflow Insight forums! I understand that you would like to include the Model file name in the custom report you are generating.  Please review the following Autodesk Help Webinar that was presented on this topic - Understanding Moldflow Insight Automated Report Tools

 

Information is presented in this webinar providing guidance for your request. 

Ultimately, you will want to update the .rpt file to include model file name you would like included on the report title page

 

TEMPLATE,default.pot
TITLEPAGE,Report Title,Author --> replace this line with "TITLEPAGE,model123.CATPart,mikael.roslund"
MESHINFORMATION, ADVANCED
MATERIALINFORMATION, ADVANCED
ANALYSISINFORMATION
PROCESSINFORMATION, ADVANCED

 

1.jpg

 

You can make this change/update to any of the .rpt files depending on which custom report you would like to run:

2.jpg

 

 

Kind regards,

Beth  Mollica

 ___________________________________________________________________

 

If my post answers your question, please click the "Accept as Solution" button. This helps everyone find answers more quickly!

Beth
-----------------
If my post answers your question, please click the "Accept as Solution" button. This helps everyone find answers more quickly!



Beth Mollica
Technical Support Specialist
0 Likes
Message 3 of 5

bernor_mf
Advisor
Advisor
Accepted solution

Hi Mikael,
the Moldflow API cannot extract cad part name in study from what I know.
There is currently no object such as StudyDoc.PartName.
Room for improvement here.

 

Some ideas to workaround your issue:

If the model name is in study name, you could use something like:
StudyName = left(StudyDoc.StudyName, len(StudyDoc.StudyName)-4)
This removes .sdy from name, but could be shortened to suit your needs, if you know model name length.
Maybe a special charachter to be able to separate cad model name from study name.

 

Another option could be using named layers.Such as:
 Set LayerManager = Synergy.LayerManager()
 Set L1 = LayerManager.GetFirst()
 While Not L1 Is Nothing
 MsgBox LayerManager.GetName( L1 )
 Set L1 = LayerManager.GetNext(L1)
 Wend

When importing CAD model, the second layer, CAD Geometry will have the model name.
This would work for one model.
If an assembly, a bit more tricky, as you will not know on which layer the used model name will be on.


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.)
0 Likes
Message 4 of 5

Anonymous
Not applicable

Thank you Beth, but I want it to be automated.

0 Likes
Message 5 of 5

Anonymous
Not applicable

This will work, but as you mentioned, the ability to add the part name would be a nice feature..

Tack 🙂

0 Likes