Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Developer Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Embedded stl fle viewer
Christopher Moll 
    
4 years ago
I have a machine shop and currently am creating a job tracking database. I'd like to have the ability to view somepartfile.stl files within the form of each part we are working on.
STL files can be viewed in Microsoft 3D viewer, but I don't know how to embed that in the form.

Is this possible?

Please point me in the right direction on this.

Thank You,

Chris
Scott Axton  @Reply  
        
4 years ago
I'm not aware of any native methods to Access to view / embed .stl files in access.

Take a look at the Images video and consider the Access Imaging Seminar

In general you don't want to embed it into your database.  Whether it is an image, document, .stl file, etc.
It really bloats your db fast and your best option is to link them in the db.

In addition to the videos above take a look at this page:  Access Open Other Programs
Kevin Yip  @Reply  
     
4 years ago
You can use VBA from within Access to open any external app, like your 3D viewer.  Sample code is below.  Put a command button on your form.  When it's clicked, run this code:

    Dim r As Variant, doublequotes As String
    Dim PathOfApp As String, PathOfFile As String
    doublequotes = """"
    PathOfApp = "C:\Program Files\MyApp\MyApp.exe"
    PathOfFile = "G:\My Documents\MyFile.stl"
    r = Shell(doublequotes & PathOfApp & doublequotes & " " & doublequotes & PathOfFile & doublequotes, vbNormalFocus)
Christopher Moll OP  @Reply  
    
4 years ago
Thank You for the insight.

Currently I save .png to a server and show them by linked object in my forms.

So, I think having a button open the native viewer for .STL files will work great.

Maybe in the future I'll figure out some other way.

Thank You so much!

Chris
Alex Hedley  @Reply  
            
4 years ago
Does MS 3D Viewer open them?
Sure there's a default Windows app that does.

If so there might be a COM plugin you could use.
Christopher Moll OP  @Reply  
    
4 years ago
running into a problem with the 3dviewer opening the path to the file on opening.
3Dviewer open fine , but loads a default example file rather than the path set in the code.

I'm including the code as written


    Dim r As Variant, doublequotes As String
    Dim PathOfApp As String
    Dim PathOfFile As String
    Dim SavedPath As String
    SavedPath = Forms!tblJobPartDetails!tblJobPartDetailsSubform.Form![3DLink]
    doublequotes = """"
    PathOfApp = "C:\Program Files\WindowsApps\Microsoft.Microsoft3DViewer_7.2107.7012.0_x64__8wekyb3d8bbwe\3dViewer.exe"
    PathOfFile = SavedPath
    MsgBox (PathOfFile)
    r = Shell(doublequotes & PathOfApp & doublequotes & " " & doublequotes & PathOfFile & doublequotes, vbNormalFocus)
Christopher Moll OP  @Reply  
    
4 years ago
@Alex   Yes windows 3D Viewer opens them nicely
Scott Axton  @Reply  
        
4 years ago
Christopher
Trying to think outside of the box a bit here.

If you just double click a .stl file from file explorer does it open up in 3D Viewer (or another program)?

In other words, is it an associated file in Windows?

Windows --> Settings -->  Default Files.
Scroll down until you find Default by File Type.

Scroll down until you find .stl  - If there is a program associated it will show to the right.  If not choose the program you use to view / edit the .stl.

Once the file is associated with a program you can use the FollowHyperlink command to open the file.

See the Document Index video.
Also covered in Access Developer 39

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Developer Forum.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 6/16/2026 12:29:37 PM. PLT: 3s