Reply

Filename as document number macro

[ Edited ]

Continuing from this post about putting the filename (without extension) into the 'Document Number' file property.

 

The attached macro does just that since the same was not found in the original post mentioned above.

 

Any suggestions for improvement are welcome.

Thanks.

 

 

Tushar Suradkar

www.SurfAndCode.in

www.CADVertex.com

 

18 REPLIES

Re: Filename as document number macro

Nice! I do this manually right now. If I ever get some time, I will be trying your macro.

 

Along this path I have another question related to part numbers.

 

Right now I have to use extra file to manage part numbers. If I make a drawing of an angle iorn with some holes in it, that drawing needs  the PN of the raw material. But when I insert that into an assembly I need the PN of the finished part displayed.

 

I found the path of least resistance is to insert the part into an assembly to hold the part number of the finsihed part so that will show up in the end asembly.

 

How do you manage this situation?

 

Re: Filename as document number macro

I do use two different properties in the same file to manage that situation: Document number and Material.

Re: Filename as document number macro

In that case the macro can be modified to access the material information and put it in a custom field under file properties.

I will watch this space if a macro request comes up.

 

~Tushar

 

Re: Filename as document number macro

We name the finished part with a new number appropriate for the job but we have a property which contains our number for the raw material.

Bruce Shand
ST9 MP8 - Insight - Win10 - K4200

Re: Filename as document number macro

One detail. So the material the part is made from is not in the part number slot?

 

I have gone to the following scheme.

 

Extrusions (Angles, pipes etc) and gages (Sheet material) have a slot that also includes the material. That is followed by one are two cut lengths. Then I have a part number (number of material or part), but there in is my problem.

Re: Filename as document number macro

[ Edited ]

"So the material the part is made from is not in the part number slot?"

 

Not sure to whom the question is addressed but my answer to that is you are correct. A part number for the finished part which will appear on its drawing format if applicable and in an assembly BOM. The raw material number would be referenced with a fabrication drawing and on a cut list BOM if applicable in addition to the part number.

Bruce Shand
ST9 MP8 - Insight - Win10 - K4200

Re: Filename as document number macro

For me, almost every drawing is a fabrication drawing and I made a decision early on that I'm only going to use a single format of parts list for everything. This is why I wonder how other's get things done like this. My cost is to use a model file as a place holder for the part number vs. your cost of adding another parts list format and additional custom fields.

Re: Filename as document number macro

[ Edited ]

Not sure I understand. The part file holds all the properties. If you can make one BOM format work for all your needs then good. I don't really see "cost" or extra difficulty as an issue. BOM formats are easy.

Bruce Shand
ST9 MP8 - Insight - Win10 - K4200

Re: Filename as document number macro

[ Edited ]

The parts list has a single slot for part number.

 

When I draft that part, the part number needs to display the material the part is made from.

 

When that part is inserted into an assembly, the part number needs to display the number of the finished part, not the material it's made from.

 

I only have a single slot in the model file for part number.

 

To handle both situations, either you have two files or two slots for the numbers.

 

If you use two slots to hold part number, then the parts list must also have an additional slot to display both. I don't have room to display both as I draft everything on 8.5X11

 

Note: Cost is the number of steps required to accomplish the desired result.

 

I think an important factor here is what our drawings actually look like.

 

I attached one of my typical drawings.