cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

boxing gentext APP

otudor
8-Gravel

boxing gentext APP

Is there any way to add a box around a GentText using APP?

1 ACCEPTED SOLUTION

Accepted Solutions

Hi Gareth,

 

Thank you for the replay. Your solution is correct but missing a lot of details, and that may be because I did not express my issue clear enough and for that I do apologize.

I was looking to box just the gentext and not the whole element that contains the gentext.

To box only the gentext I have done the following:

1. Select the element where the gentext would appear

2. Select Generated text category

3. Click Edit button for Before text or After-text, depends where you want to place the gentext.

4. Here is the trick...In the new window select Insert --> User Formatting Element (UFE)

5. Call it whatever you feel like that day...this element would show up in the Element list and would have a blue color rather than yellow color, which is the color for the elements that are defined in the current DTD. You can style the UFEs just the same way you style regular elements.

6. Put the gentext you want in the new UFE just created

7. Select Element tab and then the UFE just created, which supposed to be at the beginning of the element list.

8. Apply a Block style to the new UFE. This is the second trick...

9. With the new styled UFE selected, select the Property sets category and apply the boxing property set to the UFE from the Available property sets list. If you do not have a boxing property set, then you would have to create a new one by selecting Property Set tab. Once created repeat step 9.

9a. If you do not like the solution in step 9, you can skip the step 9 and apply an Edit Context Source to the new UFE which would contain the same script as the custom boxing property set, the difference is that you won't be able to reuse it in other places.

 

The size of the box can be controlled with:

block.paddingTop = block.paddingBottom = "2pt";
block.paddingLeft = block.paddingRight = "0pt";
block.marginRight = "93pt"
block.marginLeft = "94pt";

 

Florin

View solution in original post

3 REPLIES 3

Last time I checked, you had to use edited source to add boxing. For APP, that means firstly the gentext must be in a block. Secondly you have to edit the source for the block element/context/condition that includes the gentext. Thirdly you have to edit the block (fBlock) object and update its rules (fRules) property with the relevant boxing.

Hi Gareth,

 

Thank you for the replay. Your solution is correct but missing a lot of details, and that may be because I did not express my issue clear enough and for that I do apologize.

I was looking to box just the gentext and not the whole element that contains the gentext.

To box only the gentext I have done the following:

1. Select the element where the gentext would appear

2. Select Generated text category

3. Click Edit button for Before text or After-text, depends where you want to place the gentext.

4. Here is the trick...In the new window select Insert --> User Formatting Element (UFE)

5. Call it whatever you feel like that day...this element would show up in the Element list and would have a blue color rather than yellow color, which is the color for the elements that are defined in the current DTD. You can style the UFEs just the same way you style regular elements.

6. Put the gentext you want in the new UFE just created

7. Select Element tab and then the UFE just created, which supposed to be at the beginning of the element list.

8. Apply a Block style to the new UFE. This is the second trick...

9. With the new styled UFE selected, select the Property sets category and apply the boxing property set to the UFE from the Available property sets list. If you do not have a boxing property set, then you would have to create a new one by selecting Property Set tab. Once created repeat step 9.

9a. If you do not like the solution in step 9, you can skip the step 9 and apply an Edit Context Source to the new UFE which would contain the same script as the custom boxing property set, the difference is that you won't be able to reuse it in other places.

 

The size of the box can be controlled with:

block.paddingTop = block.paddingBottom = "2pt";
block.paddingLeft = block.paddingRight = "0pt";
block.marginRight = "93pt"
block.marginLeft = "94pt";

 

Florin

UFEs are the correct way to do what you're asking, thanks for the great write-up!

Top Tags