Format File Name in Property Text

Hi,

 

Is there any way to split the Filename Text property?

My filename is NameOfTheAseembly_NameOfThePart.par

I can get rid of the ".par" using File Name (no extension) but I would like to get rid of "NameOfTheAssembly_" too.

 

I would like the showed text to be just: NameOfThePart

 

Is this possible?

 

Regards,

Iker.

20 REPLIES

Re: Format File Name in Property Text

I do not know if SE can do so.  but as a place to start testing...

 

This will trim the string in Excel   =RIGHT(A1,LEN(A1)-FIND("_",A1))

 

 

===================================================
Matt Johnson
Solid Edge Certified Professional (ST7 & ST8)
Solid Edge ST9 (SEEC) - Production
NX10 (Tc Integration) Pre-Production Testing
Teamcenter 10.1.6

Re: Format File Name in Property Text

Thank you, but what I would like to do is a template draft sheet that automatically got its fields from the Part. I have already done it with the Drawing Number which is taken from the Properties of the Part.

 

The problem with the name is that it is too long and it's difficult to fit it in my block so I would need some way to split that long name into two lines:

 

From here:

NameOfTheAseembly_NameOfThePart.par

 

to here:

     NameOfThePart

NameOfTheAseembly

 

I have some programing skills and I know how to do it in Excel or VB but I would like to know if there is a direct way to go wihtin Solid Edge (ST7).

 

Regards,

Iker.

 

Re: Format File Name in Property Text

Honored Contributor
Honored Contributor

Hi @stphn_maturin

 

 

 

IMHO no, there is no integrated methode to split a property text into separate fields.

The only way and method I know and I'm using for years, is, to do it the other way round.

I have several properties e.g. in Your case: "ASM_used" an the partname already is here

 

This two single properties can be placed in Your draft header one after the other using

%{ASM_used|R1}_%{filenamewithout ending|R1} to have them written in one line in Your drawing header.

 

 

 



regards
Wolfgang

Re: Format File Name in Property Text

Thanks for your answer, it's interesting for other purpouses.

 

But in my case, we have many parts that have the same name e.g. "Spring.par" and we decided that, in order no to have same names that can be confusing, always include the name of the general assembly that part is used on e.g.: "VolkswagenGolfLeftDoor_Spring.par".

 

This way each part is perfectly identified within windows folder structure and can be found easily. The drawback is the long and repetitive name:

 

VolkswagenGolfLeftDoor_Spring.par

VolkswagenGolfLeftDoor_Handle.par

VolkswagenGolfLeftDoor_Window.par

etc...

 

I just wanted to know if I could use the name of the part file on the draft block in a better formatted way.

 

Thanks anyway!

Re: Format File Name in Property Text

Phenom
Phenom

In my opinion using only names for models is not a good idea - it is too easy to create duplicates.

What if you have a new type of VWGolf ?

Do you then call it NewVolkswagonGolfLeftDoor-Spring.....etc

Use numbers if possible - they are easily made unique.

HP Z420 16GB RAM
Quadro K4000
ST7 MP10 on Windows 7 Pro 64.

Re: Format File Name in Property Text

Hi,

 

Thanks for your interest. I find this point really interesting.

 

If a new Golf model is designed but the spring used is going to be the same as the previous model, I will not change the name of the part. I will just use the old part in the new model:

 

1.- VolkswagenGolfDoor.asm

   1.1.- VolkswagenGolfDoor_Spring.part

 

2.- NewVolkswageGolfDoor.asm

   2.1.- VolkswagenGolfDoor_Spring.part

 

If the spring is new because this new model requires a new spring then yes, I will design a new spring with the new name:

 

2.- NewVolkswageGolfDoor.asm

   2.1.- NewVolkswagenGolfDoor_Spring.part

 

Here is the problem with numbers: You don't know what they are.

 

Let's suppose I'm designing the NewVolkswageGolfDoor.asm assembly and I want to add the old spring to it.  I just open the folder where I have the parts of the old model using windows explorer:

 

VolkswagenGolfDoor_Window.part

VolkswagenGolfDoor_Handle.part

VolkswagenGolfDoor_Spring.part

....

 

And I drag the part I need to the assembly I am working on, in this case the spring.

 

Now, let's see what happens with numbers:

 

021574498.par

021548686.par

021589546.par

.....

 

It's far more difficult to drag the part you need. The same if you want to look for a part in your folder system. It's easier if the file name of the part matches the actual part, isn't it?

 

Regards,

Iker.

 

 

 

 

 

 

Re: Format File Name in Property Text

Siemens Genius Siemens Genius
Siemens Genius

and what about 3rd generation of VWGolf you will use NewNew?

Re: Format File Name in Property Text

Ha ha ha,

 

No, I will use:

 

Golf2017-01_Spring.par

Golf2017-02_Spring.par

Golf2018-01_Spring.par

....

 

What I meant is that having the word "spring" is important for me (we are a SME). This name system has worked for 10 years quite well. I'm sure that is not the best way for big companies or big teams but it works for small ones (I think).

 

Regards,

Iker.

Re: Format File Name in Property Text

Esteemed Contributor
Esteemed Contributor

I think this shows why a PDM system of some kind is called for. That way an arbitrary number can be used for the file name and other properties define/describe the part attributes. Then you can search on these properties. You can also use a property to define the part name on the drawing.

Or maybe just the Built-in Data Management approach though I'm not familiar with the way searches work with that. "Meaningful" names seem to always create more problems than they solve. Though I confess that it's done that way here where I work too. We use a 4 digit number for the job or GA. I'm not crazy about it but that's the way, like you, it has been done for some years. It's hard to change an established method though. I just wouldn't start out that way.

You could create a property that has just the info you want for the text instead of trying to manipulate the file name text.

Bruce Shand
ST9 MP10 - Insight - Win10 - K4200