Continue to Site

Welcome to MCAD Central

Join our MCAD Central community forums, the largest resource for MCAD (Mechanical Computer-Aided Design) professionals, including files, forums, jobs, articles, calendar, and more.

sheetmetal feature relation

dcrow

New member
In my flat pattern instance I want to make a hole move to a different location by use of a relation. I don't want to make it move by adding a new collum in the family table, but insted I am trying to write an "If statement" relation using the flat pattern as reference to when the hole should move.


for instance


IF "feature id234==no (id234 is the flat pattern instance)


d324=2.354


endif


If anyone has any ideas it would be appriciated greatly.


dcrow
 
I do not think this is possible. I do not know that you can do this. You might want to look into the "exists()" function, but I think this is only to check for parameters or dimensions. I have longed wished for a way to determine if a feature is supressed, but have not been able to do it.

Jim
 
I cannot see what you want to achieve
- you have a sheetmetal part with a hole
- in unbent state this hole should be in a different position ??
This is clearly impossible.
Or do you want to dimension the hole in unbent state ?
Then you can unbend your part, make your hole(s) and bend back.
ReinhardN
 
I thought of one way to determine if a part is in the bent or flat state.

There is a function called SEARCH() which returns the position of the text you search for.

Example:

Generic sheet metal part name is "MY_PART"
Flat pattern instance is named "MY_PART_FLAT1"

To determine if the current part is the flat part, use the following relation:

IS_FLAT = SEARCH(REL_MODEL_NAME,"FLAT")!=0

Now, if IS_FLAT is equal to YES, then you are currently in the flat part. If IS_FLAT equals NO, then you are in the generic.

Note, the SEARCH() function searches a string and returns the position in characters of the word you search for. If it does not exist, then is returns zero.

This way, if the function returns a number NOT EQUAL TO (!=) zero, then you know the part name contains the string you searched for.

This can be used anywhere this functionality is useful. The string can be any string, parameter, etc.

I hope this helps.
Jim

ps - This handles figuring out if you are in the generic or flat. Others may be able to help you move the hole.
 
Further clarification:

SEARCH ( SEARCH_PARAMETER , " STRING TO SEARCH FOR " )

Function returns location of string.

If REL_MODEL_NAME == "MY_PART" then
SEARCH(REL_MODEL_NAME,"FLAT") would return 0

If REL_MODEL_NAME == "MY_PART_FLAT" then

SEARCH(REL_MODEL_NAME,"FLAT") would return 8

Jim
 

Sponsor

Articles From 3DCAD World

Back
Top