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

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

How do I define a specific start part in AFX?

RussC
6-Contributor

How do I define a specific start part in AFX?

I want my AFX/EFX parts to be created with an analysis feature and a specific relation to define the weight of the part like my companies start part.  I have found the relations file to add the relations, but I can't figure out how to add the analysis feature.  I tried copying the analysis feature portion from my start part in the Pro/Program and adding it to the start_mdl.cfg file for AFX.  That did not work.

6 REPLIES 6
MartinHanak
24-Ruby III
(To:RussC)

Hi,

I hope B&W software expert Samuel Brantner can answer your question.

MH


Martin Hanák

Hi Russ Calo,

to share the answer to all users here the full question you sent me as PN:

Hi Samuel,

Martin Hanak at PTC told me to contact you with my question.  I want to have my EFX parts automatically created containing a specific relation:

IF exists("EFX_ITEM_NR")

PARTNUMBER=EFX_TEM_NR

ELSE

PARTNUMBER=rel_model_name

ENDIF

Could you please help me with this issue?  If I add the below relation to the param_relations file it fails because EFX_ITEM_NR isn't added until I run the part numbering function.  I would have thought it would be fine since it is checking to see if it exists.

Second, I also need an analysis feature automatically added to the part to determine the weight of the component like my companies start part.  So, I am looking for another way to deal with that.  I tried copying the analysis feature from the add section of my current start part  Pro/Program syntax into the start_mdl.cfg file and it did not work.  I tried copying the same syntax into the EFX_Start_beam_inch.prt file and that didn't work either.  Although, I'm not sure how EFX knows to use this start part in the first place.  Any help would be greatly appreciated.

Here the answers:

1st part of the question:

I tried it with this relation.

  if exists("EFX_ITEM_NR")

  partnumber = EFX_ITEM_NR

  else

  partnumber = rel_model_name

  endif


And it worked on my end.

NOTE: This can lead to unintended behavior if you work with profile systems (e.g. Bosch)

2nd part of the question:

Unfortunately it is not possible to add custom features to your parts via a configuration. At least not analysis features that are in the footer of a part.

However you can define a relation for that purpose and you will need to set the config.pro option mass_property_calculate = automatic to make it work.

I used this relation:

mass = mp_mass("")

P.S. If you  want to make it perfect you can also do the following:

  • Go to afx/configuration
  • Rename _hidden_config.cfg to hidden_config.cfg
  • edit the File and add the line ALLOW_ADDING_POST_REGEN_RALATIONS YES

Now create a new file in afx/parts/<TYPE> (TYPE = profiles, connectors, etc.) named param_relations_post_regen.txt

In this file add the relation for the mass calculation (e.g. mass = mp_mass(""))

If you do as I told you, you have the benefit, that your mass properties will always be added to the parameter

after all features are regenerated and therefore the mass will be correct after the first regeneration

NOTE: Depending on your AFX version the param_relations_post_regen function is not implemented. I think that came with Creo 3.0 M050.

I hope that answers your question

Greetings Sam

Samuel Brantner
B&W Software GmbH
RussC
6-Contributor
(To:SamuelBrantner)

Thanks Samuel,

Your answers helped me!

I confirmed relation works for the part numbering logic, I had a syntax error which caused the problem in my part.  The unit_weight = mp_mass("") works, but then if I make a change, I can't ever get the parameter to update.  We found this when we upgraded to Creo 1.0 (we are currently on 2.0).  If I add the config to update automatically our parts continue to checkout even when no changes are made in Windchill which was a nuisance to the users.  We will manually add the analysis feature through a mapkey for now, and possibly build a custom app for applying the analysis feature in a batch mode

Thanks,

Russ.

Hi Russ Calo‌,

have you  tried following options:

mass_prop_update_force_change NO

regenerate_read_only_objects NO

Greetings Sam

Samuel Brantner
B&W Software GmbH

In the text I wrote:

  • Rename _hidden_config.cfg to hidden_config.cfg

but it should be

  • Rename _hidden_options.cfg to hidden_options.cfg

Greetings Sam

Samuel Brantner
B&W Software GmbH
Mahesh_Sharma
22-Sapphire I
(To:RussC)

Russ,

You may mark Samuel's valuable reply to post as correct answer. 

Announcements
NEW Creo+ Topics: Real-time Collaboration


Top Tags