Skip to main content
16-Pearl
February 28, 2019
Question

Replace reference in pro/program

  • February 28, 2019
  • 2 replies
  • 1768 views

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??

2 replies

KenFarley
21-Topaz II
February 28, 2019

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.

 

 

 

Gucio16-PearlAuthor
16-Pearl
February 28, 2019

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.

 

 

12-Amethyst
March 1, 2019

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"