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

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

UDF - Change text value

hdasilva
14-Alexandrite

UDF - Change text value

Hello

 

I want to create a UDF to automate engravings.

The engraving consists in the Extrude of a text value, having a hole and 2 planes as references.

I was able to create the UDF, and automate the engraving, but I want to be able to have the text as a variable that I can change when running the UDF.

Ex: IN1, IN2. IN3....

hdasilva_0-1625674719928.png

Is this possible?

 

Thanks

 

 

 

6 REPLIES 6
tbraxton
22-Sapphire I
(To:hdasilva)

You can include a variable parameter in a UDF. If your engraving can access such a parameter then you will be able to define the string with each placement of the UDF as a variable.

 

https://support.ptc.com/help/creo/creo_pma/r7.0/usascii/index.html#page/part_modeling%2Fpart_modeling%2Fpart_five_sub%2FTo_Define_Variable_Parameters_in_a_UDF.html%23 

========================================
Involute Development, LLC
Consulting Engineers
Specialists in Creo Parametric
hdasilva
14-Alexandrite
(To:tbraxton)

@tbraxton 

I tried to do it, but when I hit the Define button on Var Parameters nothing happens, maybe this can only be done with annotation feature, and not with extrude/sketch?

tbraxton
22-Sapphire I
(To:hdasilva)

You can only select features that contain parameters. Have you defined a feature parameter in the feature of interest within the UDF? 

 

This thread addresses variable text using pattern functionality. It details the feature relation used to alter the text within the pattern and may be helpful as a reference for you to understand how to exploit relations/parameters to alter text values. Review the model and watch the video, I think it will be helpful.

https://community.ptc.com/t5/3D-Part-Assembly-Design/text-repetition/m-p/697310 

 

 

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

你好!

这个是完全可以实现的

如何你已经完成了UDF放置的动作了,那么你需要做的是在创建UDF之前,向草绘特征中创建一个特征参数,然后在草绘中创建文字的内容时连接这个参数,而这个参数值,通过代码来给定。

我的方法是:

1、首先创建草绘随意输入内容

2、创建特征参数,比如TEXT,当然我也添加其它的控制性参数

3、我又添加了特征关系式,目的是可以选择性的控制这个文本是否可以直接使用模型名称和文本的大小

4、再次编辑刚才的草绘,直接双击之前创建 文本→内容选择参数,

 

我上几个图片供你参数,希望可以提供帮助 

QQ图片20210605154943.png

01.png

02.png

03.png

   

WJT276
4-Participant
(To:hdasilva)

看看是不是这个效果呢,如果是这个效果,就添加特征参数来控制。

hdasilva
14-Alexandrite
(To:hdasilva)

I didn't had the chance yet to try this solutions, as soon as I have opportunity will I will check this.

 

Thanks!!

Announcements


Top Tags