Inventor Customization

Inventor Customization

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

Saveas Case Sensitive?

128 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: 352
Registered: ‎07-21-2006
Message 2 of 2 (93 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
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.