Community
Inventor Forum
Welcome to Autodesk’s Inventor Forums. Share your knowledge, ask questions, and explore popular Inventor topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Multiple Lines of Text in a custom iProperty

10 REPLIES 10
Reply
Message 1 of 11
vdc01
3404 Views, 10 Replies

Multiple Lines of Text in a custom iProperty

Does anyone know of a way to get multiple lines of text in an iProperty? I am using a custom iProperty named "Title" so users can insert the drawing title into the title block using the custom iProperty. The only problem is that the title comes out all on one line and goes outside the title block. Should I be using iproperties or is there a better way?
10 REPLIES 10
Message 2 of 11
bradeneuropeArthur
in reply to: vdc01

Hi,

 

Long ago, but do you have a solution for "Multiline Text " in I-properties?

 

Grt

 

A.Knoors

Regards,

Arthur Knoors

Autodesk Affiliations:

Autodesk Software:Inventor Professional 2024 | Vault Professional 2022 | Autocad Mechanical 2022
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: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 !

Message 3 of 11

In your titleblock setup, you can narrow the size of the text field associated with this parameter.  This will force it to wrap as needed, or stretch as needed.  It's completely up to you.  Play with it by entering some very long strings of text and then manipulate the field size until it all fits the way you want.

 

title.JPG

 

(ignore the blue line, that's just a sketched alignment line).  Smiley Happy

Message 4 of 11
Emerson717
in reply to: cbenner

Thank you cbenner, we are doing that already but I would also want to dictate where the line breaks are.

Is there a newline character similar to AutoCAD's /n? 

Message 5 of 11
mdavis22569
in reply to: Emerson717

We use a single and double line title block .. We have a Description Line 1 and Description Line 2 under our Custom tab in Iprop. We then put those into our title block ...and whether you have 1 or 2 lines doesn't matter, it only shows up if you populate those custom lines in the Iprop' tab like this:http://a360.co/1k0wOlS

Did you find this reply helpful ? If so please use the Accept as Solution or Kudos button below.

---------
Mike Davis

EESignature

Message 6 of 11
MartinBernat
in reply to: mdavis22569

Hi,

 

you may want to post this issue to Autodesk IdeaStation to share it with the Development team. Maybe there are more users that will find multi-line iProperties useful.

 

Martin Bernat

Autodesk

Message 7 of 11
salariua
in reply to: Emerson717

What I found was that they are all multi-line but the iProperties window shows just the last line of text except for Comments. So if you don’t use Comments you can type you text there and in the Title box enter =<Comments> which will bring your formatted text over.

                For now I have 3 custom iProperties for each line and merge them with iLogic forcing a line feed after each value like this:

        iProperties.Value("Summary", "Title") = iProperties.Value("Custom", sTitleLn1) & vbLf & iProperties.Value("Custom", sTitleLn2) & vbLf & iProperties.Value("Custom", sTitleLn3)

 

Adrian S.
blog.ads-sol.com 

AIP2012-2020 i7 6700k AMD R9 370
Did you find this reply helpful ?
If so please use the Accepted Solutions or Like button - Thank you!
Message 8 of 11
max.eekhout
in reply to: salariua

Searching for an answer in 2016 I've found another solution. By creating a special character for 'breakline'.

 

Create a Custom iProperty and call it 'br' for example. Add a value of 'vbNewLine'. You can do this by creating an iLogic rule and placing this code into it:

 

iProperties.Value("Custom", "br") = vbNewLine

 

 Then you can make a Custom iProperty which you want to show on your drawing and formatting it like this:

 

=LINE1<br>LINE2<br>LINE3

 

If you link this iProperty to a text field in your drawing it will show as 3 seperate lines!

 

 

 

Message 9 of 11
marcel
in reply to: max.eekhout

Searching for something else I stumbled into this post.

 

We faced the same problem (Title could be longer than the titleblock) and others issues (see below) and solved it with iLogic. I will try to describe the whole proces simplified as it is using multiple iLogic rules.

 

Start point:

For historical reasons 3 different  iproperties have been used  and where shown in 3 seperate lines in the titleblock.

We kept this because we can filter/sort on this in vault by dragging columns

Let's call them 3D_iProp_1, 3D_iProp_2 and 3D_iProp_3

 

My solution of having full control of what is displayed in the titleblock is:

- Start all used iLogic rules by events or a button in the form

 

3D:

With iLogic these 3 iproperties are combined to a 4th with spaces in between them

3D_iProp_4 = 3D_iProp_1 & " " & 3D_iProp_2 & " " & 3D_iProp_3 to be able to see the combined value in Vault and use in several semi-automatic mails send. Not needed for the rest of the solution.

 

2D:

The 3D_iProp_1, 3D_iProp_2 and 3D_iProp_3 are retrieved from 3D to a parameter in 2D

3D_iProp_1 => 2D_Par_1

3D_iProp_2 => 2D_Par_2

3D_iProp_3 => 2D_Par_3

 

In an iLogic form these values are displayed as read only

Extra parameters are created and shown to:

- Set the character from where the value is shortened 2D_Par_?_L

   When a value is shortened automaticly the code " . . ." is added to show it is not the full value

- Set the number of spaces added to the end of this value to force the next value to the next line 2D_Par_?_Ext

 

 

With iLogic these 3 iproperties are again combined to a 4th with the given modifications in 2D

2D_iProp_4 = Left(2D_Par_1; 2D_Par_1_L) & (if shortened " . . . " & (2D_Par_1_Ext * " ") & Left(2D_Par_2; 2D_Par_2_L) & (if shortened " . . . " & (2D_Par_2_Ext * " ") & Left(2D_Par_3; 2D_Par_3_L) & (if shortened " . . . ")

 

2D_iProp_4 is then used in the tileblock. To prevent loosing information on the drawing the full title is also displayed in the left bottom corner just beneath the border by simple showing  2D_Par_1 & " " & 2D_Par_2 & " " & 2D_Par_3

 

Example (without the extension possibility for clarity)

3D_iProp_1 = "Line 1 is much too long" & 2D_Par_1_L = 9 => "Line 1 is ..."

3D_iProp_2 = "Line 2 is even longer so the issue remains" & 2D_Par_2_L = 14 => "Line 2 is even ..."

3D_iProp_3 = "Line 3 is short" & 2D_Par_3_L = 999 (999 is the code for no shortening) => "Line 3 is short"

 

Result in titleblock:

"Line 1 is ..."

"Line 2 is even ..."

"Line 3 is short"

 

Our engineers can now fully control what is shown in the titleblock.

Much more functionalty is available in the iLogic rules, for example:

- Abbrivations are autocorrected to be always in front of a space

  (preventing abbrevations in the middle of a number or word)

- Known and frequently returning values are automatily set to the abbrevation length

- Check if 2D_Par_?_L is not longer than the total length of the value to prevent the added "..." when not needed

- etc.

 

We control other values in the same way, for instance the material.

Message 10 of 11
max.eekhout
in reply to: marcel

It's great you found a solution for your problem!

Perhaps you might consider skipping the adding spaces bit and add a <Environment.Newline> instead (linebreak).

 

In our company, we have created an addin toolbar for Inventor, so we don't need iLogic anymore, which is a very poorly written coding language, hard to maintain and hopelessly out of date in my opinion. We used it for years as well, for very complex scripts.

 

However, if it works for you, great!

 

If you want to find out about addins... look for videos like this one.

https://www.autodesk.com/autodesk-university/class/Creating-Add-Ins-Inventor-2018 

Message 11 of 11
marcel
in reply to: max.eekhout

Hi Marc,

 

I had seen that and i'm reconsidering the benefits and downside for us.

But thanks for reminding me again.

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

Post to forums  

Autodesk Design & Make Report