Finding if a feature is suppressed with relations?

I don't know the best way to accomplish the following:

I have a generic part with one family table instance. The instance only has one suppressed feature.

I want a relation that changes a dimension based on the suppression state of that feature. If the feature (ID 318) is not suppressed, the dimension (M) = . If the feature is suppressed the dimension = 0.

Here's what I tried (unsuccessfully):

IF EXISTS("fid_318") M=.03*(tan(E/2)) ELSE M=0 ENDIF

I would appreciate any help.

Todd

Reply to
bspammed2
Loading thread data ...

Why not create a parameter with the value that you want your dimension to be (real number)? Create a relation so that your dimension M = parameter. Then in your family table add a column for the parameter and set its value to .03*(tan(E/2)) and 0 for your respective instances.

Now.... I expect your dimension M is being referenced in another relation otherwise why would you set it to zero if the feature it comes from is suppressed? Whether your relation will read the correct value of M=0 from a suppressed feature I don't know. But if possible you might want to go straight to the parameter for your value, so that the relation refers to the parameter rather than the dimension M from your family table instance.

Make sense?

Reply to
graminator

a.. rel_model_type()-Returns the current model type. If you are working in Assembly mode, rel_model_type() is equal to assembly.

b.. exists()-Evaluates whether an item, such as a parameter or dimension, exists. This can apply to the model for which the relation is being evaluated, or to any model, component, or submodel structure.

For example:

a.. if exists("d5:20")-Checks if the model with runtime ID 20 has a dimension d5.

b.. if exists ("par:fid_25:cid_12")-Checks if the feature ID 25 in the component ID 12 has parameter par.

This allows evaluation to be based on a parameter that exists in only one part of a large assembly. For example, suppose that there are several systems in a large assembly (such as hydraulic, pneumatic, or electrical systems), but the majority of objects belong to no system.

In this case, to make evaluations that are based on the parameter, you must assign the appropriate parameter to those models that belong to the system. For example, if items in the electrical system must use a part number in the BOM report table, instead of the model name, you can create a report parameter bom_name and write the following relation:

if exists("asm_mbr_cabling") bom_name = part_no else bom_name = asm_mbr_name endif

Reply to
Janes

Ug, I thought I replied to this but it's not there. Make a parameter "X" with a real number value. Set the relation:M=X

Then in your family table instance add a column for the parameter X. Set your instance value to zero, your generic value to .03*(tan(E/2)).

So your family table drives the parameter X and X drives your dimension M.

I take it you want to set M to equal zero in a suppressed feature because there is another relation somewhere that uses it? I don't know if the value will regenerate for M in a family table instance when the feature the dimension references is suppressed, but if you can you might want to change the relation so that it refers back to the parameter X rather than the dimension M. Because the parameter will always be available to be used even if dimension M isn't.

Does that make sense?

Reply to
graminator

I don't know the best way to accomplish the following:

I have a generic part with one family table instance. The instance only has one suppressed feature.

I want a relation that changes a dimension based on the suppression state of that feature. If the feature (ID 318) is not suppressed, the dimension (M) = . If the feature is suppressed the dimension = 0.

Here's what I tried (unsuccessfully):

IF EXISTS("fid_318") M=.03*(tan(E/2)) ELSE M=0 ENDIF

I would appreciate any help.

Todd

Family tables are lovely because, for one, they present the opportunity to take the same part and vary it in any number of ways. One would be, as you are doing, by suppressing a feature, others by varying feature dimensions or locations. I don't see why, when you are suppressing a feature, you can't, simultaneously, change another feature so that its dimensions are unique to that table instance. You just need to add the feature dimension to the family table. And the instance you're trying to generate will have one feature that doesn't regenerate and another that regenerates at a particular value. I really don't see why you even need relations for this. Put it ALL in the table and forget the relations.

David Janes

Reply to
Janes

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.