Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Saveas Case Sensitive?

1 REPLY 1
Reply
Message 1 of 2
KentKeller
258 Views, 1 Reply

Saveas Case Sensitive?

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

1 REPLY 1
Message 2 of 2
ekinsb
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
Inventor and Fusion 360 API Expert
Mod the Machine blog

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report