Showing results for 
Search instead for 
Do you mean 
Reply
Solved! Go to solution

Export Using Analysis Set for ABAQUS input file

Dear All,

 

I am trying to export existing Analysis set for ABAQUS input file.

Manual process is attached in "Export using Analysis Se for Abauqs.JPEG

However, If I used "feFileWriteAbaqus(0.fName), 'ABAQUS Model Write' Dialog Boxed are displayed.

I would like to export the ABAQUS input file using API with manual Process. 

Would you kindly explain or give me some examples if you have it??? 

 

Many thanks,

JohnKang

 

4 REPLIES
Solution
Solution
Accepted by topic author cats099
‎11-04-2016 09:20 AM

Re: Export Using Analysis Set for ABAQUS input file

It may be that you don't have any Analysis Set active. Is the dialog presented by the API call the same as the one in the picture you attached? I wouldn't think so.

 

The solution in brief is to manually activate the Analysis Set before calling feFileWriteAbaqus from API. Just right click the desired one and select "Activate" from the context menu displayed.

This can also be done in API, but you will to know the ID of the desired analysis, say X. Just insert the following before the call for feFileWriteAbaqus :

 

    Dim Analysis As femap.AnalysisMgr
    Set Analysis = App.feAnalysisMgr
    Analysis.Active=X

I may be misleading, this is not actually a solution but the correct approach for the documented behaviour by design for the API function. After all, if you would have multiple analysis sets in a model, how could it establish which one to use if none active?

Solution
Solution
Accepted by topic author cats099
‎11-04-2016 09:20 AM

Re: Export Using Analysis Set for ABAQUS input file

Dear Calx, 

 

Thanks for your reponse and sorry for late reply. 

It works as I want to do, but It generated Erros message.Please see the attached. .

I am suspicious of the enviorumont vairable in Window due to that  I did not set up the variable ABAQUS_EXE =c:\abaqus\v61\abaqus.exe after abaqus inp file exported from FEMAP.

Is there any way to remove the error message  using API???

Many thanks,

 

 

Dim fName As String

fName ="ABAQUS.inp"
AnaMgr.Active=1
App.feFileWriteAbaqus(0,fName )

App.feFileClose(False)
App.feFileClose(False)
App.feFileExit

 

 

Solution
Solution
Accepted by topic author cats099
‎11-07-2016 11:00 AM

Re: Export Using Analysis Set for ABAQUS input file

Hi cats,

 

I do not understand exactly what you are doing now. (I will give some leads, but please note that I am not familiar with ABAQUS actually)

 

Are you trying to export an ABAQUS analysis with the script in your message? This would be meant to be run outside Femap. Then where does the error message come from in Femap - from the export itself? By the way I would not think that script would work in Femap for the undeclared variable AnaMgr. The feFileClose call would only work once and it is not necessary after all, I think. The feFileExit would close Femap - then there it would be no chance to still see an error message in it...

 

By the way, I don't think that the error message you attached can be produced by a script - only by direct user operations on the Femap interface.

 

Then are you trying to directly run an ABAQUS analysis in Femap? This is possible and quite advisable if you don't have any particular needs. The script is then useless, as any manual attempts at exporting a file. Just set the analysis type to ABAQUS by hand and hit run. The path to ABAQUS is to be provided beforehand to Femap through the "Preferences" dialog (menu File\Preferences), the "Solvers" tab I think. (no environment variable is used by Femap for this)  

 

Finally, you should better provide us with the actual error messages mentioned by that dialog in the attached picture. They must be in Femap's "Messages" frame - usually in the lower right part of the Femap window.

Regards, 

Re: Export Using Analysis Set for ABAQUS input file

Dear Calx,

Thanks for your command and ID(pkrien) helps me to find out answer: Please see the details below:
Hide the UI before the code that raises the error, and then display it again after:

App.feAppVisible( False )
App.feFileWriteAbaqus( 0, "c:\scratch\test.inp")
App.feAppVisible( True )

After I used this command, message box disappeared.
Anyway, thank for spending your time to leave this kind message and I am very appreciated it!!!
Many thanks,

John