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.

Add If Statements wt. Modelcheck

ABB_pajo

New member
Hello !!!


Have someone a idea how to a relations with if statesment with Modelcheck.
I have tried also to use external files.... BUT I haven
 
relations in modelcheck is week at best. I'm doing a configuration of Modelcheck now so I'll keep this in mind.



In general an if statement type relation should look like:



<tt>
PRT_RELATION IF matl_code=="1086"

PRT_RELATION material="carbon steel"

PRT_RELATION ELSE

PRT_RELATION IF matl_code=="440"

PRT_RELATION material="stainless steel"

PRT_RELATION ENDIF

PRT_RELATION ENDIF





</tt>
 
At least what I attend to do seams not to work.


Short history: We use PDMLink, and all ProE files must have a unique id. In our case we have use number to be mapped in PDMLink. We have also used number to be mapped to the BOM
 
i read that in the knowledge base. You will want to review it there.



That should work yes. I gave up on relation checking some time ago as it has been painful to keep working.
 
Does anyone have any help to add to this topic? I am coming across the same problem now with relations in ModelCheckin WF2. I have an IF statement in the relations for a part, and it works there, but when I copy it into the ModelCheck start file to be applied during the check process, it refuses to do it -- MC just gets to that line, generates an output/report file (.mct) containing the full IF statement (and nothing else, no error messages that might provide a clue on how to fix it), and then moves on.


I've tried moving the statement off to an external file and using the relation_update_file option, but it doesn't read that at all (I put all of my relation statements in there, as a check, and in this case even those statements didn't show up).


I'm betting that MC doesn't allow IF statements in relations, for some reason known only to PTC. If anyone knows of a workaround on this, I'm all ears -- I'm already adding workarounds to workarounds to workarounds to fix a trivial shortcoming in the software, so what's one more kludge?
 
Perhapsthere is a limmit of the lenght of the lines that is smaller in modelcheck than in part relation.
 
Reducing the line lengths did help with some of the lines, but ModelCheck still chokes inexplicably on the IF statement.


If I put a character before it (letters, numbers, single quotes, double quotes, fwd and back slashes) MC will add the formula, and ProE will then see it as an error in the Relations dialogue (as one would expect). I tried the non-alphanumeric characters in hopes of stumbling on an escape character or something else that would get me around whateveris causing this problem, but with no luck.


Does anyone know how to get this to work? Can it be made to work? Alternatively, can someone tell me a way to get text in a table cell on a drawingto wordwrap when the string is obtained from a parameter? That's where all this comes from -- a day and a half of programming and fruitlessly picking through the "help" files, just to fix problems with the fixes to problems that started with the wordwrap issue.
 

Sponsor

Articles From 3DCAD World

Back
Top