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

Intelligent fasteners and repeat regions

nsgoldberg
5-Regular Member

Intelligent fasteners and repeat regions

We use a hardware library in Windchill with Creo 3. It works, but I started playing with the Intelligent Fastener tool and really like it. It's much faster/easier than using hardware libraries.

Therefore, I'm trying to get our BOM to work with it.

Here's my stupid part:


And here's my current BOM:


With the current relations:


Here are the screw parameters:


So I wrote this relation in an attempt to select either the screw parameters (naming, designation) for item and description or our standard model parameters (drawing_num, description), and then to tie that to the repeat region using the new parameters (item_name, item_description). The new repeat region parameters are (asm.mbr.item_name, asm.mbr.item_description). Ignore the first block, that's to list bulk items with an "AR" for quantity.


But I get an empty BOM with this relation. Using "naming" and "designation" for my repeat regions, I can get the screws to show up, but not my created hardware:




So. Any idea what I'm doing wrong? I've spent several hours trying different combinations but can't seem to get it to work.

 

Also, is there a way to make all text uppercase? I don't see a "toupper()" function, like some programming languages have. My guess is you'd have to write additional relations for this capability.

Wondering if I should just give up and stick with our hardware libraries...

1 ACCEPTED SOLUTION

Accepted Solutions

Hi,

 

I am sending modified drawing. It contains following repeat reqion.

repert_region_modified.png

The most important change was made in Local Parameters section of Relations dialog box. I added two parameters - see red rectangle.

added_params01.png

I clicked OK button and the Relations command again. Now new parameters were displayed as shown below.

added_params02.png

So ... basic rule, which must be fulfiled is ... every parameter mentioned in relations must be present in Local Parameters section. Unfortunatelly parameters, which are not displayed in repeat region cells must be added manually.


Martin Hanák

View solution in original post

23 REPLIES 23

Your repeat region should use "item_description" not "description" and it will be rpt.rel.item_description in the region.

 

I don't recall useful string manipulation functions being available. PTC supplies just below the bare minimum.

nsgoldberg
5-Regular Member
(To:dschenken)

Thanks for the quick response!

 

"description" is the current part parameter we use. My newly created parameter is "item_description" which does not work. I have tried both:

asm.mbr.item_description

rpt.rel.item_description

and neither one works - the field ends up blank.

 

I figured there wouldn't be a method of converting to uppercase easily. Figured I'd ask though.

nsgoldberg
5-Regular Member
(To:dschenken)

Here is my repeat region:


And the result:

You could make things easier and make the columns wide enough to read the contents so the entries don't overlap.

 

Anyway, I recall that using underscores is something to be avoided for repeat region relations. Feel free to shorten the names to IN and ID, at least for a trial.

Underscores are indeed a problem if you are working in Repeat Region Relations(*)

 

Try this:

if exists("ASM_MBR_ITEMNAME")
   my_name=asm_mbr_itemname
else
   my_name=asm_mbr_name
endif

 

ITEMNAME is the User Parameter defined in your part, MY_NAME is the value you want to show in your Repeat Region, which you define as "rpt.rel.MY_NAME"

 

(*) I believe that Creo will replace any underscore with a dot, then evaluate that parameter.

ASM_MBR_ITEMNAME will translate to asm.mbr.itemname (which exists)

ASM_MBR_ITEM_NAME will translate to asm.mbr.item.name (which does not exist), not to asm.mbr.item_name

nsgoldberg
5-Regular Member
(To:HamsterNL)

So, trying "ID" and "IN" instead didn't work.

 

I tried hamster's method and it worked using "my_name". So the underscore works in that string parameter.

 

I think my issue was not using "asm_mbr" prior to calling a parameter within the part. Here is what I have now:

 

if exists("ASM_MBR_DESCRIPTION"

item_description=asm_mbr_description

else

item_description=asm_mbr_designation

endif

 

So now the table will show the description for my created parts, but is blank for the screw file. I've tried several of the parameters listed, as well as making my own parameters (BUWSIZE and NICKG). I can't get anything other than "asm_mbr_name" to display in my table. Here is the parameters shown on the hardware:

3.PNG

I appreciate the help you've given. Hoepfully it's something simple I"m overlooking.

Hi,

 

I guess you are right ... the problem is hidden in your files. Therefore you have to zip them (drawing, assembly, parts) and upload them. When I have your data, I can find the root of the problem.


Martin Hanák
nsgoldberg
5-Regular Member
(To:MartinHanak)

Attached are the model files used. Thanks for the help!

BenLoosli
22-Sapphire III
(To:nsgoldberg)

In the relation editor, you can verify if an expression will evaluate correctly by using the =? button.

In your case, if exists(asm_mbr_designatation) returns an error, which is why the code isn't working.

 

I just noticed in the original post that "asm_mbr_type", which seemed to work was in the parameters list, but none of the others were, which would mean the relations would all fail and not assign values.

 

The way around this is to give a default value at the start of the repeat region relations for any relation parameters as a way to debug the code.

 

If what you put was accurate,

 

if exists(asm_mbr_designatation)

 

would certainly fail because the argument has to be in quotes, and probably fail because 'designation' is misspelled.

 

Good tip on the "=?" button.

nsgoldberg
5-Regular Member
(To:dschenken)

if exists("asm_mbr_designation") is in quotes and is spelled correctly. Unfortunately, my Creo machine is separate from my internet-connected machine so I have to switch back and forth, transferring my files and screenshots on a disc and re-writing what I'm putting in code.

 

I did some troubleshooting with the "=?" feature, but I don't know how that helps in this situation. The repeat region command is going to check each find number using my relation and return a value. The "=?" feature isn't querying a specific find number, so I'm not sure what it's supposed to return, other than an error.

Did you check to see if all the parameters you use are in the parameters list?

Also - are there any filters?
What happens when you assign a default value to the repeat region parameters at the start of the repeat region relations?

nsgoldberg
5-Regular Member
(To:dschenken)

Did you check to see if all the parameters you use are in the parameters list?

Yes, you can see a list of the parameters in one of my original posts.

 

Also - are there any filters?

What kind of filters? I haven't placed any (intentionally at least).


What happens when you assign a default value to the repeat region parameters at the start of the repeat region relations?

Great idea! Here's what I wrote (I commented out one of the sections):

 

item_name="something"
item_description="something2"

/*if exists("asm_mbr_naming")
/*item_name=asm_mbr_naming
/*else
/*item_name=asm_mbr_drawing_num
/*endif

if exists("asm_mbr_designation")
item_description=asm_mbr_designation
else
item_description=asm_mbr_description
endif

 

2.PNG

 

The end result is that the two parts I made take the set value, but the screws won't. I'm wondering if this is because we only have the free (included) version of the intelligent fasteners, and we need to pay for the full package in order to rename them.

I meant, are they in the list of parameters in the repeat relations dialog. It doesn't matter if they are in the parts. It also doesn't matter about the licensing - you aren't changing values in the parts; you are creating new parameters in the repeat region.

 

See how you had asm_mbr_type under LOCAL PARAMETERS? That same thing needs to happen for the other items.

 

BenLoosli
22-Sapphire III
(To:dschenken)

I was looking at the same thing Doug is. The hardware parameters are not being transferred to your drawing for some reason. I tried designating the parameters in the partfile but that did not help.

This has me stumped, but I had to get some of my own work done today, too! I will think about it over the long weekend and try again on Tuesday.

 

nsgoldberg
5-Regular Member
(To:BenLoosli)

Ben, thanks, I appreciate the help! I'm calling it a day too, I'll get back to it on Tuesday.

 

Have a great weekend, and thanks again!

 

Edit: I just realized you were helping me on the engtips site also, ha! Thanks!

nsgoldberg
5-Regular Member
(To:dschenken)

The only two missing were "naming" and "designation", so I added those but it still did not work.

 

However, I don't think these are necessary. The other parameters (drawing_num, description) aren't listed in the parameters, but my relations still pull that information from the part files. I think the only parameter that needs to be listed are the parameters created as a result of the relation (item_name, item_description).

 

Still, I appreciate the help and suggestions!

Try:

 

if exists("asm_mbr_designation")
item_description=asm_mbr_designation
endif

 

if exists("asm_mbr_description")
item_description=asm_mbr_description
endif

 

I also notice that 'designation' parameter is listed as being the result of a relation in the fastener file, which means that you can use the User-Defined input parameters to recreate that same result in the repeat region relations. I don't know why you would have to - generally it only takes me a short time to debug a repeat region, but then I can see all the pieces at the same time.

Hi,

 

I am sending modified drawing. It contains following repeat reqion.

repert_region_modified.png

The most important change was made in Local Parameters section of Relations dialog box. I added two parameters - see red rectangle.

added_params01.png

I clicked OK button and the Relations command again. Now new parameters were displayed as shown below.

added_params02.png

So ... basic rule, which must be fulfiled is ... every parameter mentioned in relations must be present in Local Parameters section. Unfortunatelly parameters, which are not displayed in repeat region cells must be added manually.


Martin Hanák

View solution in original post

nsgoldberg
5-Regular Member
(To:MartinHanak)

This is great, thank you! I had tried adding the parameters "naming" and "desgination", but they needed the "asm_mbr" prefix before them to work.

I then changed the repeat regions to "item_name" and "item_description", and added relations to change the value of the name (i.e. from "Hexagon Socket Head Cap Screw" to "SCREW, SHCS") and I've got a very functional screw tool that works with our BOM.

Thanks again for everyone's help! Smiley Very Happy

Hi,

 

repeat region relations are not correct. You cannot use if exists("naming") !

 

You have to:

  1. add ASM_MBR_NAMING parameter in Local Parameters area in Relations dialog box
  2. use if exists("ASM_MBR_NAMING") command

 


Martin Hanák
BenLoosli
22-Sapphire III
(To:MartinHanak)

use asm.mbr.Item_name and asm.mbr.item_description in your repeat region.

nsgoldberg
5-Regular Member
(To:BenLoosli)

That is what I'm currently using. It works for the parts I've created, but not for the hardware.

Announcements