Caps Lock

Caps Lock

AMN3161
Advocate Advocate
575 Views
4 Replies
Message 1 of 5

Caps Lock

AMN3161
Advocate
Advocate

Hello

 

This is probably a simple question but I am doing a look up at a excel document and replacing the iproperty "description" I saw that you add ".ToUpper)" to the code to make it caps but I am not 100% sure how to implement it

 

thank you ahead of time

 

 

0 Likes
576 Views
4 Replies
Replies (4)
Message 2 of 5

bradeneuropeArthur
Mentor
Mentor

Every string has a ToUpper or ToLower function.

 

Dim Qwerty  as string 

Qwerty thIS

 

Qwerty.ToUpper gives THIS

Qwerty.ToLower gives this

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

Message 3 of 5

Anonymous
Not applicable

Try the code below.

To test: Create a part file "Part-001.ipt", then run the code. Then save as the file to "Part-002.ipt", run the code again and check iproperties.

 

 

'Get the filename
Dim oFileName As String = ThisDoc.FileName(False) 'without extension

'Check if it is correct
MessageBox.Show(oFileName, "File Name")

'This will automatically find your filename in the excel
oExcelFile = GoExcel.FindRow("C:\Test\Test.xlsx", "Sheet1", "Part Name", "=", oFileName)

'This will find your "Description" column in the excel. Should be typed exactly.
ExcelDesc = GoExcel.CurrentRowValue("Description")

'Check if it is reading from excel
MessageBox.Show(ExcelDesc, "Description from excel")




'ToUpper or ToLower
MessageBox.Show(ExcelDesc.ToUpper, "ToUpper / ToLower")

iProperties.Value("Project", "Description") = ExcelDesc.ToUpper


 

 

0 Likes
Message 4 of 5

AMN3161
Advocate
Advocate

Could you attached the IPT file? i think you forgot to

0 Likes
Message 5 of 5

WCrihfield
Mentor
Mentor

Here's the simplest example using only iLogic:

Copy this code into a new rule, then run it.

Dim oStr As String = "cAse"
MsgBox("oStr = cAse" & vbCrLf & _
"oStr.ToUpper = " & oStr.ToUpper & vbCrLf & _
"oStr.ToLower = " & oStr.ToLower,vbOKOnly+vbInformation," ")

If this solved your problem, or answered your question, please click ACCEPT SOLUTION.
Or, if this helped you, please click 'LIKE' 👍.

If you have time, please... Vote For My IDEAS 💡and Explore My CONTRIBUTIONS

Inventor 2020 Help | Inventor Forum | Inventor Customization Forum | Inventor Ideas Forum

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes