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

Replace reference in pro/program

Level 9

Replace reference in pro/program

Hi all,

 

is is it possible to replace reference for feature in *.prt in pro/program. Ex. Having parameter A=“DTM1” sketch feature should be create on DTM1 datum. But when parameter A=“DTM2” - DTM2 should be used??

 

any ideas??

Krzysztof
3 REPLIES 3

Re: Replace reference in pro/program

I don't use pro/program, but do a lot of relations stuff. That said, I can look at the program for a model via the Model->Model Intent->Program menu selection.

From what I see there, the datum you are using for a feature is specified in one of the FEATURE blocks. For example, in one of my models, it says something like

 

 

PROTRUSION: Extrude
No.        ELEMENT NAME       INFO
---          ---------------------          -------
1           Feature Name            Defined
...
4.1.1     Sketching Plane         PLN-Z0:F3 (DATUM PLANE)
...

Presumably, if I wanted to change the plane reference I'd need to replace "PLN-Z0:F3" with another reference. It seems to be <Feature Name>:F<Feature Number>.

It doesn't seem to be something that you can use a parameter for, unless I'm wrong. I don't know if you can use parameters in any area of the program except the relations.

 

 

 

Highlighted

Re: Replace reference in pro/program

you can use parameter for control if whole feature is created or not.
if Parameter_A=="DTM1"

ADD feature_A
END IF
so if Parameter_A has different value - feature_A is suppresed.

 

So, in that case, I can solve it by creating two features, and can control which should be created at given time. But my case is much more complicated. That's why I would like to control specific line inside "block".

Maybe there is another way to achieve it.  Maybe pro/program is not a proper solution.

 

 

Krzysztof

Re: Replace reference in pro/program

I am sure you have thought about this but if nothing else is attached or referenced to DTM1 could you not just change the location of DTM1 when parameter A = "DTM2"