Counting specific dimesions

Here is a fun question.


I have an assembly with 10 planes inside of it. The location of each of those 10 planes is either 3.125, 5.125, 6.125, 7.125 or 0.


What I want to do is have an automatically summed total of the planes at each dimension.


For example

0 @ 7.125

1 @ 6.125

2 @ 5.125

7 @ 3.125

0 @ 0


I can't think of any method that get's this done.


The reason I want to do this has to do with part numbers.


Re: Counting specific dimesions

I can't think of a way of doing this using the standard tools, however it sounds like something that would be easy enough for someone with knowledge of the developer APIs. You could try posting on the developer forum and see what that gets you.

Re: Counting specific dimesions

[ Edited ]

These are the kind of fun challenges I love and this one seems to be a good candidate for I am almost finished writing a quick little macro for this task.


Can you further tell if :

1. The planes are all in same direction, for e.g. all in Z-Dir or also in different directions.

2. The document unit.


I am testing the macro on a test assembly with planes that look something like this:




It's almost 9:00 pm out here and I am rushing home. Sorry about not posting the macro.

But I will be back at desk after exactly 12 hrs and watch this space for your inputs.


Good night.




Re: Counting specific dimesions

Attached is a screen shot. All of the planes in this case are chained along the Z axis.


The dimensions represent the space needed for drawer packs. The drawers are 0.125 shorter than the space for each drawer. D1....D10 are my variable names.

Re: Counting specific dimesions

[ Edited ]

I assume the distances 7.125 and so are those between successive planes and not the distance of each plane from the default Top(xy) assembly reference plane and also that these planes were created in order.


The attached macro when run on the attached sample assembly displays the output as below:




[EDIT]: The extension .asm is not supported hence changed to .txt. Pls remove.

Re: Counting specific dimesions

[ Edited ]

The results only do any good if they are variables that can be displayed in draft.


Yes they are chain planes between other chain planes. The planes are used to control the height of the steel case, and are 1/8" over the height of each drawer that get's installed inside. A set of holes are located in relation to each plane. When the distance is 0, the two planes co-inside removing a set of holes (in reality is being punched twice in the same location)


To goal here is part number display. The Quantities of 3" 5" and 6" drawers are included as a portion of the part number I want to automatically dispaly in the title block. The other potions of the part number are already available from the plane positions.


I will give that macro a look later today. I should have time this afternoon. Thank you for the Macro Tushar.




The Macro works great, but my goal still can't be accomplished of getting those number into a variable for display in draft with other variables.


I wish I had the time to learn how to write code for SE like this, but I don't. After about 2.5 years at the current company as the only drafter, I'm up to handling about 60% of what is desired. I still need to double my speed before I have spare time. The stuff I don't handle still gets done with hand sketches. I'm hoping ST9 solves many of my "slow down" issues.....another can of worms.