iLogic to Combine Text and Existing Parameter - Similar to Excel concatenate

iLogic to Combine Text and Existing Parameter - Similar to Excel concatenate

wtriplett
Contributor Contributor
1,966 Views
3 Replies
Message 1 of 4

iLogic to Combine Text and Existing Parameter - Similar to Excel concatenate

wtriplett
Contributor
Contributor

Hi - I am new to iLogic and hopefully there is a simple answer to this post. 

 

I am trying to create a new parameter called LabelPart by adding "AA-" to an existing parameter called PartNumber

 

If the PartNumber were 0001 the new parameter LabelPart would be AA-0001

 

I have looked through the forums and can't seem to find a way to solve this.

 

I appreciate any help.

0 Likes
Accepted solutions (2)
1,967 Views
3 Replies
Replies (3)
Message 2 of 4

A.Acheson
Mentor
Mentor

@wtriplett 

 

I think you can concatenate like this without iLogic in an iProperty?

 

Formatted text is the term for linked parameter in ilogic. It is a difficult subject  so you really have to read every customization forum post to get a sense of what’s happening, also if you search in the API help you will likely get a sample in VBA to work with. If you have this moved over to the customization forum it will likely get more views.


Do you want this new parameter in the template file? What type of text are you looking to use the formatted text in general note, leader, view label etc ?Unfortunately it needs to be targeted into an object of some kind!

Can you provide a couple of screenshots this would help?


An example of how this would work, although not perhaps your solution a lead in to the topic. 

https://forums.autodesk.com/t5/inventor-customization/ilogic-insert-text-parameter-into-a-text-field...

 

 

 

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan
0 Likes
Message 3 of 4

johnsonshiue
Community Manager
Community Manager
Accepted solution

Hi! The syntax should be similar to VB.Net. You can use '+' to combine strings or text parameters like the following.

 

LabelPart = "AA-"+PartNumber

 

Many thanks!



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer
0 Likes
Message 4 of 4

wtriplett
Contributor
Contributor
Accepted solution

Thank you @johnsonshiue 

 

I used the following:

 

LabelPart = "AA-" & PartNumber