Community
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iLogic: Update compiler to support String Interpolation

iLogic: Update compiler to support String Interpolation

String interpolation has been available in Visual Basic since version 14 back in 2015. It allow you to replace things like this:

 

MsgBox("Part '" & doc.DisplayName & "' needs to be saved: '" & doc.Dirty & "' and needs to be updated: '" & doc.RequiresUpdate & "'.")
' - or -
MsgBox(String.Format("Part '{0}' needs to be saved: '{1}' and needs to be updated: '{2}'.", doc.DisplayName, doc.Dirty, doc.RequiresUpdate))

with this:

 

MsgBox($"Part '{doc.DisplayName}' needs to be saved: '{doc.Dirty}' and needs to be updated: '{doc.RequiresUpdate}'.")

This is a very handy feature that makes constructing strings for message boxes, part numbers, etc. much easier and more friendly to read. It would be great to have this available in iLogic scripts.

2 Comments
DRoam
Mentor

Related idea: Update iLogic compiler to support modern and useful VB.NET features. The new request is a more general but perhaps more accurate one, asking to fix the root of this problem: the outdated compiler used by iLogic.

Will.Ehrendreich
Contributor

I agree completely. needs to happen.

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

Submit Idea  

Autodesk Design & Make Report