Inventor Customization

Reply
Valued Contributor
KentKeller
Posts: 87
Registered: ‎09-23-2008
Message 1 of 2 (127 Views)

Saveas Case Sensitive?

127 Views, 1 Replies
10-15-2013 12:14 PM

Does Saveas really need to be case sensitive.

 

I just spent a lot of time trying to figure out why my addin wasn't working and all that was wrong is I had a capital P on png.

 

Dim sPath As String = System.IO.Path.GetDirectoryName(sIDWName) & "\PartsLists"

 

 Dim sFileName As String = System.IO.Path.GetFileNameWithoutExtension(sIDWName) & ".Png"

vs

 Dim sFileName As String = System.IO.Path.GetFileNameWithoutExtension(sIDWName) & ".png"

 

Dim sPNGName As String = sPath & "\" & sFileName
        MsgBox(sPNGName)
        oCamera.SaveAsBitmap(sPNGName, 1124, 899)

Kent Keller
KWiKMcad

ADN Support Specialist
ekinsb
Posts: 321
Registered: ‎07-21-2006
Message 2 of 2 (92 Views)

Re: Saveas Case Sensitive?

10-18-2013 04:46 PM in reply to: KentKeller

This is odd behavior and I am able to reproduce it and have filed a change request (ID 1507740).  Another odd thing is that I only see it with png files. With the following test, I get all of the files created except for Testing2.PnG.

 

Public Sub SaveAsTest()
    Dim c As Camera
    Set c = ThisApplication.ActiveView.Camera
   
    Call c.SaveAsBitmap("C:\Temp\Testing1.png", 0, 0)
    Call c.SaveAsBitmap("C:\Temp\Testing2.PnG", 0, 0)
    Call c.SaveAsBitmap("C:\Temp\Testing1.bmp", 0, 0)
    Call c.SaveAsBitmap("C:\Temp\Testing2.BmP", 0, 0)
    Call c.SaveAsBitmap("C:\Temp\Testing1.jpg", 0, 0)
    Call c.SaveAsBitmap("C:\Temp\Testing2.jPg", 0, 0)
End Sub



Brian Ekins
Developer Technical Services
Autodesk Developer Network
Autodesk, Inc.
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.