CAD software discussion forum > Other CAD/CAM Technology > NAME YOUR FILES AND OBJECTS WITH CARE

NAME YOUR FILES AND OBJECTS WITH CARE

Rank: 1

ChrisWard2k2

Newbie

posts: 2

Registered: 2011-11-22

Message 1 of 17

 NAME YOUR FILES AND OBJECTS WITH CARE
11-11-2004 03:58 . am | View his/her posts only
Hello everybody

A few words of caution concerning the naming of files (not just .VX files) and VX Objects. You could hit problems later if you do not take care:

1) Do not use Metacharacters





A common list of Metacharacters (Letters that may have a special meaning to VX or to Windows):





! @ # $ % ^ & * ( ) - + = { } [ ] | / : ; " ' < > , . ? ~ `





It is wise not to use these characters in any File Name or Object Name. There are a lot of object types in VX, so having your own/company formal naming convention is a good idea.





VX is mature and so pretty resilient to potential metacharacter problems, but nevertheless, some of the equation solving that VX does for you "behind the scenes" can only be described as immense - an un-accounted for metacharacter could cause a failure, or worst, a partial failure. The gloom and doom scenario would be lost time (waiting for a CAD or CAM solve that then fails for no apparent reason), or database corruption. It is not worth the risk.





Windows is uncomfortable with Metacharacters and thinking ahead, you might one day move over to a different OS.





2) Ensure that your Object Names are unique across all VX files





In VX, the Object is "King", not the file it is stored in. It is therefore imperative that your Objects have unique names. Do not simply use the system - generated names like Part001 etc. This is especially important with regards to Part/Assembly Objects, which can be inserted as components in other Part/Assembly Objects in other separate VX Files. Potentially all objects can be affected though, including CAM cutter names and variable/expression names. Better to be safe than sorry, as we say in the UK.





Rank: 1

OldForumPost

Newbie

posts: 0

Registered: 2012-1-14

Message 2 of 17

18-12-2004 06:28 . am | View his/her posts only
Absolutly right, Chris !

Somebody who knows the "early time" of EDP does not use these characters as a matter of princible.
But sometimes I get such named objects of our customers. And the first I tell them is not to use those (equal it is reason for their problem or not). Also some of your listed characters may "work" by now, it is wise not to use them. As you say: Better to be safe than sorry !

Cheers
Bart

Rank: 1

OldForumPost

Newbie

posts: 0

Registered: 2012-1-14

Message 3 of 17

27-10-2005 10:46 . am | View his/her posts only
Hi,

I could use some help here. I haven't yet figured out the correct way of working with VX when I want copy an entire project and then start modifying the copy while retain the original configuration.

I'm modeling large custom air conditioning systems. My models are large assemblies of subassemblies and individual parts of things like heat exchangers, pumps, filters, fittings etc. all in and enclosure with doors and hinges and handles. Nearly all of the sizing parameters (length, width, depth of the enclosure) are defined in an equation set. Presumably, I should be able to design my next machine by copying to last one to a new folder and then changing the parameters in the equation set and then regenerating the parts, subassemblies and then assemblies. When I copy however (for instance use the File > Save As command to save the original with a new file name in a new folder, I end up a new VX multi-object file that violates Chris's second rule above "2) Ensure that your Object Names are unique across all VX files".

How should I be doing this (Start a new large assembly by copying an old one)?

Thanks in advance,

Jeff Miller

Rank: 1

ChrisWard2k2

Newbie

posts: 2

Registered: 2011-11-22

Message 4 of 17

27-10-2005 05:54 . pm | View his/her posts only
Ah, a rules violator!


Well, you have started in the right way - one should always copy VX files using "Save As" from within VX, rather than an external copy via Windows.

As I don't have your assembly, I don't know exactly how you have set things up - i.e., what changes occur when equation values are edited? Also, are the assemblies and sub-assemblies all VX component Assembly Objects or are they multi-body Part Objects?

If you can ensure that VX can't "see" the original Project when you are working on the current Project, it will not complain.

However, if you have components coming into the Assembly from other seperate VX Files, this will be hazardous, especially if you click-through to parametrically change sizes, since those changes will filter through to all other assemblies that use the same parts.


Rank: 1

ChrisWard2k2

Newbie

posts: 2

Registered: 2011-11-22

Message 5 of 17

28-10-2005 02:34 . pm | View his/her posts only


Hi again Jeff




An alternative solution would be, having copied the original file using "Save As", to re-name all of the Root Objects so that they are unique. A cheap way to ensure you have unique names is to append the current date to all of them. Of course, if you have a lot of objects, that will take some time.




I have just written a program that will do this job:




Example




If current date is 28th October 2005




Original Object Name: Widget001
New Object Name: Widget001_281005




If current date is 28th October 2005




Original Object Name: Widget001_140205
New Object Name: Widget001_281005




There are a lot of considerations for the automation of this task, and although I have run a number of tests, I don't know if there is anything I have not thought of that could have a negative effect on the way your file is set-up to work. (I have been confined to the bedroom this week, struck down by flu, so my brain is too numbed to think anyway).




So, I shall email the program to you. Please install it, try it, and check that your file works as expected afterwards. I'm sure this util will be useful to other customers too, so your input would be gratefully received.


Rank: 1

OldForumPost

Newbie

posts: 0

Registered: 2012-1-14

Message 6 of 17

28-10-2005 03:06 . pm | View his/her posts only
Chris,

Thanks for the help and the program. I'll give it a try this weekend and send feed back.

Jeff Miller
AIL Research, Inc.
www.ailr.com

Rank: 1

Robert

Newbie

posts: 0

Registered: 2011-11-22

Message 7 of 17

29-10-2005 09:50 . am | View his/her posts only
Jeff,

Another alternative: use the Clone command (which we designed exactly for "starting a new large assembly by copying an old one")

Rank: 1

ChrisWard2k2

Newbie

posts: 2

Registered: 2011-11-22

Message 8 of 17

29-10-2005 04:31 . pm | View his/her posts only
.......right mouse click on the assembly name in the assembly manager form to select the Clone command. This command works quickly and is easy to use. However, it does not reproduce equation controlled relationships nor make long object names unique.

Rank: 1

OldForumPost

Newbie

posts: 0

Registered: 2012-1-14

Message 9 of 17

31-10-2005 11:01 . am | View his/her posts only
ChrisW,

Will you have this program on the VX Marco Library? If not, can you please email me a copy?

This seems like a very usefuly macro to the point that it could be a standard VX function.

Thanks!

Rank: 1

ChrisWard2k2

Newbie

posts: 2

Registered: 2011-11-22

Message 10 of 17

31-10-2005 01:54 . pm | View his/her posts only
Hello again Clinton

Let's see how Jeff gets on with it first, then of course it will be made available to all.

Rank: 1

OldForumPost

Newbie

posts: 0

Registered: 2012-1-14

Message 11 of 17

01-11-2005 01:09 . pm | View his/her posts only
Chris,

I tried your Rename add-in on one of my less complicated project files with little success. In this project I modeled a couple of vertical sump pumps with associated pieces, parts, and fittings so there are lots of individual parts and sub-assemblies. As soon as I tried to run the new rename tool VX quit abruptly.

I then created a new VX project file with only one object (a nice cylinder), saved it, and then ran the rename tool. It worked as advertised.

I've attached my larger project if you want to take a look at it. As stated above, as a self-taught VX modeler I tend to be a breaker of rules (or more correctly oblivious of rules). I am trying to improve myself so please feel free to correct an obvious bad habits.

Thanks for the help.

Jeff Miller

AIL Research, Inc.
www.ailr.com

Rank: 1

ChrisWard2k2

Newbie

posts: 2

Registered: 2011-11-22

Message 12 of 17

01-11-2005 01:16 . pm | View his/her posts only
Hi Jeff

I will take a look at your file asap. There is nothing in the rename program that should cause a crash, so your experience sounds alarming :-)

....erm, I can't see your attachment?

Rank: 1

ChrisWard2k2

Newbie

posts: 2

Registered: 2011-11-22

Message 13 of 17

03-11-2005 10:03 . am | View his/her posts only
Hello again everyone, and thanks to Jeff for his sample file.

Well, Jeff's file does have a problem, there is some corruption present - a Root Object, found in the file database by the ReName program, is not present in the Root Objects List. I do not know if the file problem was caused by metacharacters being present in Object names, but it is worth avoiding them.

I have changed ReName to now process only the Objects that are in the Root List. Additionally, the program now outputs a plain text log file to the User archive folder - if anything goes wrong, you will be able to find out what Object caused the problem by studying the log file. Also, it will test Part and Assembly Objects to see if they regenerate.

ReName has had a lot of testing now on several files. It is safe to use because you run it in a copy of the original file (copy from within VX using File "Save As"). If you use it, please let me know if it works well (or not well) for you. Test Equation and Variable reliability by changing some values.

FREE DOWNLOAD

Rank: 7Rank: 7Rank: 7

Paul

Moderator

posts: 314

Registered: 2011-9-17

Message 14 of 17

19-05-2006 02:42 . am | View his/her posts only
Hi Chris,
Yes I know this is an old thread but it covers an issue of interest.... hence my sniffing around here.

Question: Is a space a metacharacter? Is it a character at all !

If so, I presume the underscore _ is not a metacharacter???

Reason I ask is, discovering that if I have a space in a sketch name then trying to insert an equation within the sketch, the equation falls over on account of the space not recognised as a valid character in an equation. (which suggest's it is not a character after all)

I have always thought having spaces in file names is a bit of a daft idea. Didn't Apple invent it! Hmmm. An aroma for thought eh.

So would this make the instruction re naming objects, Do not use metacharacters or psuedo characters???

Cheers

Rank: 1

ChrisWard2k2

Newbie

posts: 2

Registered: 2011-11-22

Message 15 of 17

19-05-2006 06:20 . am | View his/her posts only
Hi Paul

The space character has, unfortunately, a bit of a problem in Windows itself. It is possible for folders with a space in the name, e.g. "New Folder", to be inaccessible to some applications but accessible by others.......

Back in VX, best advice is to avoid using the space character altogether - Folder names, filenames, object names (Part, Sketch etc). The underscore character (New_Folder) is 100% fine.

Rank: 1

ChrisWard2k2

Newbie

posts: 2

Registered: 2011-11-22

Message 16 of 17

30-05-2006 09:35 . am | View his/her posts only
Hi again everyone

I forgot to mention that you need to take care when naming export files too. Some formats embed the original file name within the export file, which can be a "double wammy" for applications that do not like metacharacters in names (Many CAD systems, ProE in particular).

This means that, if you create an export file and then later realise that the name needs to change, you cannot simply change the file name in Windows because this obviously will not change the embedded record.

Rank: 1

Mike

Newbie

posts: 0

Registered: 2002-8-28

Message 17 of 17

29-09-2006 12:11 . pm | View his/her posts only
I still see files sent to me everyday with special characters. I would like to reiterate the "NOT RULE".

DO NOT USE SPECIAL CHARACTERS.

No spaces, no dots. The more programs you interface with the more chance for problems. If you are using the IMS Post Processor; they don't like special characters.

We like the dash and underscore.
See also