Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

[FEMAP API] Defining a disc drive location as a string

[FEMAP API] Defining a disc drive location as a string

[FEMAP API] Defining a disc drive location as a string


I've developed a basic api programme to capture and save pictures of output from a modal analysis. The programme orientates a deformed view of the model and saves a view of the graphics window for a defined range of output sets.

I would like the programme to allow the user to define the location that the pictures save to, using a dialogue box, but can't seem to work out how to do this.

Any help would be appreciated!


RE: [FEMAP API] Defining a disc drive location as a string

If you don't mind the dialog asking for confirmation to create the file, you can use the following:

CODE --> WinWrap

GetFilePath$("filename", "JPEG files|*.jpg", "c:\", "Save output pictures", 1) 

It will return a string with the path, but will not actually create the file (nor the starting folder).
The WinWrap helpfile explains the parameters.

Hope this helps.

RE: [FEMAP API] Defining a disc drive location as a string


try these lines of codes:

Dim RefFileName As String
rc = App.feFileGetName("Give the path and name of the reference picture file","PNG file","*.png",False,RefFileName)
If rc = 2 Then End

RefFileName =Mid(RefFileName,1,InStrRev(RefFileName,"."))


Seif Eddine Naffoussi, Stress Engineer
33650 Martillac û France

RE: [FEMAP API] Defining a disc drive location as a string

Thanks for the help! I've managed to get both of these suggested methods to work.

For reference, I've ended up using the following:

Dim objShell, objFolder, objFolderItem
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.BrowseForFolder(0, "Select folder to write file(s)", &H1)
If objFolder Is Nothing Then
Exit Sub
Set objFolderItem = objFolder.Self
End If
Set objFolderItem = Nothing : Set objFolder = Nothing : Set objShell = Nothing

I found that by changing the current directory I don't have to define the file path using the feFilePictureSave2 method which makes it easier for me to get the program to automatically name the pictures as it saves them.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login


White Paper - PLM and ERP: Their Respective Roles in Modern Manufacturing
Leading manufacturers are aligning their people, processes, and tools from initial product ideation through to field service. They do so by providing access to product and enterprise data in the context of each person’s domain expertise. However, it can be complicated and costly to unite engineering with the factory and supply chain. Download Now

Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close