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

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

Pattern numbers

bhale
1-Newbie

Pattern numbers

I am trying to find a way to create a grid of sequential numbers, eg.

1 2 3 4

5 6 7 8

 

It doesn't matter if its done in a model, assembly, or sketch as long as it counts from 1 to what ever number I choose.

It doesn't matter if its geometry or cosmetic as long as it shows up where it should be located in the drawing. (No linguistic note tricks)

 

This is for engraving location numbers on a flat plate. Surely someone has run into this before and has work around.

If this is a repeat question please direct me to the answer as I was unable to find it.

Thanks for any help in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
rcook
6-Contributor
(To:bhale)

One more small refinement. I added a relation to tie the increment of the rows to the number of columns. As it was, you had to manually match the two. Now all you need to do is change the number of pattern instances to set how many rows/columns you want. Everything else follows (after a regen).

patterns.jpg

View solution in original post

22 REPLIES 22
Mahesh_Sharma
22-Sapphire I
(To:bhale)

Brian,

Check attached video, I hope that will help you.

Mahesh,

nice video . I would suggest to create a "group" of 1234 (firstly) and pattern it (secondly).

MH


Martin Hanák

That can also be done. I appreciate your inputs.

Mahesh,

Sorry it took so long to respond.

First off I don't know how you thought to do that but it is pure genius! I can make this work for my application and it will save a lot of time.

However I was wondering if there is a way make the pattern create subsequent rows without creating a new parameter and sketch for each row?

Your example goes 1-10, now on the next row I need 11-20 and the third row 21-30 etc. all the way to 200. A little copying and pasting of params and I can get this done

but I will always take a quicker way if I can get one.

Thanks

Mahesh_Sharma
22-Sapphire I
(To:bhale)

Brian,

I am sorry I tried to get results as per your requirement however it didn't work.

Martin has some suggestion, we may ask for help about his inputs.

MartinHanak

Did you tried grouping 1234 and pattern later? If possible add some inputs here. 

Mahesh, You led me toward the answer. Here I what I ended up doing.

Martin, I dont think i understood what you meant by group then pattern. 

Video Link : 6354

This is the first video I have ever tried to post, let me know if it works or not.

Sorry the quality is not better.

Mahesh_Sharma
22-Sapphire I
(To:bhale)

Brian,

It is really nice. I was missing Unpattern to make it working further.

Thanks for sharing the video.

Please upload the video as attachment

When replying "Use Advance Editor" to attach the video.

rcook
6-Contributor
(To:bhale)

Brian,

You can also build off of Mahesh's original method by patterning in two directions. You will need some feature that you can increment in multiple "directions". I built one similar to yours, but with a point to define the "ones" and "tens" increments and a single distance analysis for both. I also put the scaling factor for the tens in the pattern instead of the relation. Different ways to skin a cat. See attached if you are interested. Sorry - no time for a video...

numbers.jpg

rcook
6-Contributor
(To:rcook)

I should mention that this method also makes it fairly straightforward to create rows that aren't in multiples of 10.

numbers2.jpg

psobejko
12-Amethyst
(To:rcook)

This was fun; here's another method that does not use the length feature...

The part parameter "NUM_IN_X" specifies the number of cells in each row, and also drives the number of members in 1st direction of the 2D pattern "NUMBER_GRID".

The number of members in the 2nd direction of this pattern specifies the number of rows...

number_grid.png

psobejko
12-Amethyst
(To:psobejko)

Grid adapted to flow to right and down, also with variable spacing between cells.

Also noted that multiple regenerations are needed with this method if the grid size is increased...

Interesting that no such requirement if the grid size is decreased.

bhale
1-Newbie
(To:rcook)

I seriously don't know how you guys figure this stuff out! That is awesome. How did you figure that out!

We tried this method originally but couldn't get the two directions to work.

I new the number of columns was the limiting factor of my method. Moving forward I am probably going to use this method.

Yours seems to have a  better regen time than mine as well.

rcook
6-Contributor
(To:bhale)

One more small refinement. I added a relation to tie the increment of the rows to the number of columns. As it was, you had to manually match the two. Now all you need to do is change the number of pattern instances to set how many rows/columns you want. Everything else follows (after a regen).

patterns.jpg

psobejko
12-Amethyst
(To:rcook)

Roger, I just had to investigate what was making my method so much slower than yours.  I figured that using itos() function in a relation was a real drag (for some reason I thought that the text feature in sketch had to use string type of parameters).  Changing to using integers sped things up considerably.

Still, your solution with 3 features per group was still faster than mine with only 2 per group.  I can buy that a sketch feature with 4 dimensions is more costly than a point and an analysis feature.

So, I worked on it and stumbled on this method: a 2D pattern of sketches using a PART parameter CELL_TEXT which is re-calculated in each CELL with a sketch relation:

fast_grid_relation.png

it is fast, and does not require multiple regenerations.  Take a look; vary the PART parameters NUM_IN_X and NUM_IN_Y to change the grid size, and vary the NUMBER_GRID pattern increments d8 and d11 to change grid direction and spacing.


One more note: the file size is at the beginning small (attached PRT file is ~150kB).

But then: trying a 35x25 grid, then changing back to a 5x4 pattern and then saving the part results in a ~5.8MB file?!?!; Does anyone else get the same result (my system is Creo 2, M150) ?

rcook
6-Contributor
(To:psobejko)

Paul,

I like it. I've done something similar for other things - I guess I should have thought about it a little longer. I guess I was just taking the proposed method and tweaking it to make it work in 2D.

Personally, I would ditch the parameters and control everything from the pattern definition. It does require another regen after changing the pattern, but I like controlling everything in one place:

SIMPLE_PATTERN.jpg

I'm not sure what is happening with your file size. I took mine, went to 35x25 and then back to 5x4 and the file size was 381 kB. Creo 2 M120. I almost always work in Windchill, so I don't usually pay much attention to file size to be honest...

bhale
1-Newbie
(To:bhale)

Here is the video as an attachment for those that need it.

If you cannot read it here is the formula I used as well.

foo=length:FID_1_COUNT + (10*(length:FID_10_COUNT - 1))

I just used your video and it worked like a charm. However, I need to have one pattern as you show it 1-50 and then another pattern 51-100. How do I start the second pattern.

Thanks,

Eric

2017-06-20 - huffmaej 0002.jpg

Hi,

simply repeat the same procedure once again using following relation

foo=length:FID_1_COUNT + (10*(length:FID_10_COUNT - 1)) + 50

MH


Martin Hanák

That was too easy. Worked like a charm.

I've got another one for you.

I need to make a another set of numbers. These new numbers are an exact copy (1-100) just shifted to the right by 11".

What I want to do is copy the existing, paste using original references, modify the HORZ sketch by 11", and watch all the numbers translate.

What I get is a locked up computer and/or pattern failure and/or partial pattern regen (meaning some of the pattern doesn't show).

Any idea on how I can translate just the text without the processing baggage?

Thanks,

Eric

2017-06-21 - huffmaej 0001.jpg

Thanks,

Eric

Well, one way would be to modify the sketch so that it displays two identical text strings with the right one shifted by 11"...

In fact, it seems to me that you could go a step further and do the whole thing using only one pattern - the sketch being patterned would be comprised of 4 text objects...

Hi,

on my test model, I cannot copy pattern.

Suggestion: Simply repeat the same procedure once again (on right side of your model).

MH


Martin Hanák

Maybe you can do some exercise and create UDF for numbering purposes.


Martin Hanák
Top Tags