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

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

Using Parameters in commands

MohaSharifi
6-Contributor

Using Parameters in commands

I want to define parameter for number of members in pattern, can anyone know how?pattern numbers.png


This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
6 REPLIES 6

Make your patterened feature and then set a relation to drive the pattern number from a parameter.

pattern+parameter+driven.jpg

Thanks Gary

Moha,

If you right-click, edit the pattern feature, the number of pattern members will show up as one of the editable items.

Click the Swap Dimensions icon swap dimwnsions.png

and you will see the names of the dimensions. The number of pattern members in each direction is always a 'pxxx' number, p301, or p12, or something like that.

In a drawing, you can use that number directly in a note by typing '&p12 holes ...etc.'.

The problem comes when your pattern has more than one direction. There is no single parameter for 'p1 + p2'. If you want a parametric note in yur drawing for the total number of holes in a p1 x p2 pattern, you will need to create a parameter no_of_holes in the part and use a relation to make no_of_holes=p1+p2.

Conversely, if you want to use a parameter to drive the number of holes in a given direction in your part, make the pattern and identify the 'pxx' number as before, then make a parameter I_want_this_many_holes in your part and use a relation to make p1=I_want_this_many_holes.

See also:

http://communities.ptc.com/message/240055#240055

and

http://communities.ptc.com/ideas/3639

I hope this helps.

John

MohaSharifi
6-Contributor
(To:JWayman)

Thanks John

The answer is that you cannot do this directly, but the value in your image can be driven by parameters and relations. It just requires a separate step to manipulate this value.

bduncan
15-Moonstone
(To:MohaSharifi)

Top Tags