Automatic text generation

Automatic text generation

p.kaminskiG7KX4
Enthusiast Enthusiast
986 Views
8 Replies
Message 1 of 9

Automatic text generation

p.kaminskiG7KX4
Enthusiast
Enthusiast

Hello, 

I am asking for help.

I would like to be able to insert a text generated from the form ind Inventor drawing. I would like to create a form with which I could automatically insert a few lines of tthe tex, e.g. comments such as coating, type of treatment etc.

I tried to search the solution but with no results. Does anyone have an idea how to do that?

Geatings

0 Likes
Accepted solutions (1)
987 Views
8 Replies
Replies (8)
Message 2 of 9

arkelec
Collaborator
Collaborator

Do you mean a form that loads to allow you to type or paste live text, so that the text then appears in a note on the drawing?

0 Likes
Message 3 of 9

Cadkunde.nl
Collaborator
Collaborator

I would suggest to use custom iproperties.

If you make a form, then add custom iproperty: Coating or Treatment

When you type in that form, the value goes directly to that iproperty

Then in the model you can retrieve that information in sketchedsymbols, border, text, leaders, etc

 

 

0 Likes
Message 4 of 9

p.kaminskiG7KX4
Enthusiast
Enthusiast

Yes, exactly. Depepnds on part, comment will be diffrent. So, I would like to change them fast with form.

0 Likes
Message 5 of 9

arkelec
Collaborator
Collaborator

OK, so pretty much what @Cadkunde.nl suggested.

Have you created a form before?

Have you created a custom iProperty before?

Have you created a custom sketch symbol before?

 

It's relatively easy to solve your problem, but it would be useful to know how much of the above you are familiar with.

 

 

 

0 Likes
Message 6 of 9

p.kaminskiG7KX4
Enthusiast
Enthusiast
Basically, I am learning iLogic. It would be better to know all this steps.
0 Likes
Message 7 of 9

A.Acheson
Mentor
Mentor
Accepted solution

Hi @p.kaminskiG7KX4 

See this post here where I have explained the steps and provided  drawing with a symbol containing text. You can also skip the symbol portion and just place a general text note. Post back with any questions and images of the problem you are facing. Is your intention to place this form in a template drawing or do you want the ability to customize to any drawing? If for any drawing then a global form is needed and the storage of the parameters storing the information becomes challenging. 

 

 

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

p.kaminskiG7KX4
Enthusiast
Enthusiast

Thank you A.Acheson.

By the way, I would like to ask about an additional option that can be added. I have a checkbox in the form. When I select it, I'd like the description to appear. If unchecked, there is no description. For example, a coating. If the element has a shell, I select the option in the checkbox and it automatically appears as a note in my text field. I know that it must be saved as a parameter, but I don't know what condition it must meet to make it active or inactive depending on the state of the checkbox. I attach photos.

0 Likes
Message 9 of 9

A.Acheson
Mentor
Mentor

Can you post the code your using? A little difficult to diagnose when it has to be recreated. If you want the iproperty to be blank you can let it = to an empty string  by ""

 

A = ""

The only down side of that is if you have a list there will be large gaps between the information which may not look good. You could place a seperated  symbol  for paint information add the symbol by code and move to desired position. Or you could write the text to a general text box. 

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