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

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

Get boarders/edges of Text field in Creo Parametric

LL_7636801
4-Participant

Get boarders/edges of Text field in Creo Parametric

Hello,

 

I am about to create a parametric model with the geometry relying on text fields that change for different parts of a family. For this I need to either know the dimensions of a text field (height and width) or have the possibility to get points (for changing text fields) on the boarder/edge of the text field. Is there a way to do this? As of what I currently see there is only a way to set/get either the height OR the width (which is the line which the text field is aligned to).

 

The blue circled area on the screenshot shows an example text field where I want to grab a point or a measurement on the outer line surrounding the text (The text is aligned to a vertical line on the left.).

 

PointOnThisLinePease.png

 

I'm happy for any help!

 

Regards,
Lukas

ACCEPTED SOLUTION

Accepted Solutions
tbraxton
22-Sapphire I
(To:LL_7636801)

This video details how to add the reference dimension to sketched text. It is not obvious and I do not think it is documented in the help files.

 

========================================
Involute Development, LLC
Consulting Engineers
Specialists in Creo Parametric

View solution in original post

18 REPLIES 18
TomU
23-Emerald IV
(To:LL_7636801)

Are you hoping to adjust the text to fit in the available space, or adjust the geometry to be larger than the resulting text?

LL_7636801
4-Participant
(To:TomU)

Hello TomU,

 

the text size is fixed and set by its height I set in advance. I now want to get the width/length of the text field OR set a point on the right side of the text box, when the text field ends. This should work generalized; so when the text (in the same sketch) changes via another parameter input the length/point on the right edge shall update,

tbraxton
22-Sapphire I
(To:LL_7636801)

Here is a video explanation and a demo part model  (Creo 7) that is set up to derive the width of a text string created in sketch mode. The key is to create a reference dimension for the "measured" dimension on the text. Refer to the video for details.

 

tbraxton_0-1659397804147.png

 

========================================
Involute Development, LLC
Consulting Engineers
Specialists in Creo Parametric
TomU
23-Emerald IV
(To:tbraxton)

Very nice!

  1. Due to how Creo regenerates features, I would suggest placing the bounding box relations inside the bounding box feature itself, instead of at the part level.
  2. I wasn't sure if he needed to know the height of the last character separately from the entire string. If so, a more complicated approach is going to be needed...
tbraxton
22-Sapphire I
(To:TomU)

@TomU ,

 

Is your suggestion regarding when to use feature relations a general statement about best practices for relations?

Or

In the context of the demo part I posted, do you see potential to have the relations for the bounding box to return different results (or undesired model behavior) as part relations vs feature relations? 

========================================
Involute Development, LLC
Consulting Engineers
Specialists in Creo Parametric
TomU
23-Emerald IV
(To:tbraxton)

It has to do with how Creo regenerates.  The top level part relations are evaluated once, and then each feature down the model tree is regenerated sequentially.  Since the reference dimension in the sketch may change when the feature is regenerated (due to changing text, etc.), the reference dimension will be updated after the top level part relations have already been evaluated, causing a second full-part regeneration to be required.  Creo is smart enough to attempt two full regenerations (if necessary), but it takes longer, and depending on what else is going on can increase the chance of getting the 'some relations are no longer satisfied' message.  I find it's better to create relations after the point in the model where those referenced values are being set, typically in the next feature that needs to depend on them.

 

By the way, I did a quick test of your method.  Two additional comments:

  1. I'm not seeing any need for a sketcher coordinate system.  The technique seems to work fine without it.
  2. The width dimension you're creating is actually controlling the aspect ratio.  You can see this by toggling the dimension from strong to reference and then looking at the text properties.

TomU_0-1659460563414.png

TomU_1-1659460606349.png

 

LL_7636801
4-Participant
(To:tbraxton)

Hello tbraxton,

 

Yes, this is exactly one way how my problem in theory could be solved! I now just struggle with two things:

1. How do you even get a horizontal dimension (that I can then convert to reference) of that text box? I am not able to click the box boundaries or set a measurement there.

2. The coordinate feature is grayed out in my model; how can I change that?

 

Thanks a lot so far!


@LL_7636801 wrote:

Hello tbraxton,

 

Yes, this is exactly one way how my problem in theory could be solved! I now just struggle with two things:

1. How do you even get a horizontal dimension (that I can then convert to reference) of that text box? I am not able to click the box boundaries or set a measurement there.

2. The coordinate feature is grayed out in my model; how can I change that?

 

Thanks a lot so far!


Hi,

if you want measure the distance between the end of text and box, then you can add geometrical point into Sketch 1 feature.

See modified model.

MartinHanak_0-1659425611858.png

 

 


Martin Hanák

Hello Martin Hanák,

this does not solve my problem (as far as I understand your solution suggestion) because the points/distance doesn't adapt with changing text, does it?


@LL_7636801 wrote:

Hello Martin Hanák,

this does not solve my problem (as far as I understand your solution suggestion) because the points/distance doesn't adapt with changing text, does it?


Hi,

it does because of existing relations. Please edit definition of Sketch 1 feature, modify text and regenerate the model.


Martin Hanák
TomU
23-Emerald IV
(To:MartinHanak)

@MartinHanak,

I believe the text is dynamic - either family table driven or parameter driven.  The number of characters is dynamic and the last character will not remain the same letter of the alphabet.  Any type of point placed on the last character will fail when that character changes.

MartinHanak
24-Ruby III
(To:TomU)


@TomU wrote:

@MartinHanak,

I believe the text is dynamic - either family table driven or parameter driven.  The number of characters is dynamic and the last character will not remain the same letter of the alphabet.  Any type of point placed on the last character will fail when that character changes.


Hi,

if you open model modified by me you will see that position of the point is driven by dimension ... and value of this dimension is driven by relation. You can change the text inside Sketch 1 feature -OR- relate it to string parameter value >>> it works (after model regeneration).


Martin Hanák
TomU
23-Emerald IV
(To:MartinHanak)

Ah, sorry.  I didn't realize you were doing the same thing as @tbraxton and using a reference dimension from the length to drive everything.

Hello Martin,

thanks for the hint! Can you elaborate how one can add a geometrical point like you did in your model?


@LL_7636801 wrote:

Hello Martin,

thanks for the hint! Can you elaborate how one can add a geometrical point like you did in your model?


Hi,

please replay video geom_point.mp4.


Martin Hanák
LL_7636801
4-Participant
(To:LL_7636801)

I solved 2., the grayed out coordinate system. I now still don't have/can't create a strong/reference width dimension to the text. How can I get this dimension on my text in the sketcher?

tbraxton
22-Sapphire I
(To:LL_7636801)

This video details how to add the reference dimension to sketched text. It is not obvious and I do not think it is documented in the help files.

 

========================================
Involute Development, LLC
Consulting Engineers
Specialists in Creo Parametric
LL_7636801
4-Participant
(To:tbraxton)

I totally agree! After so much time of searching for anchors on the boarders of text fields it never came to my mind to just click the text itself in order to set dimensions. Thanks a lot!

Announcements
NEW Creo+ Topics: Real-time Collaboration


Top Tags