Thanks Marco,
You did indeed fix my problem with what I had.
I was looking in the help files and found this statement which is what I was trying to follow:
$(if,$(=,$(getvar,cvport),1),mspace,pspace)
But I will remember to use eq.
Thanks
Rick
"Marco Jacinto" wrote in message news:4230a192_1@newsprd01...
Try eq instead of =, from the help files,
= (equal to)
If the numbers val1 and val2 are equal, the string returns 1; otherwise, it returns 0.
eq
If the strings val1 and val2 are identical, the string returns 1; otherwise, it returns 0.
So
$(IF,$(eq,$(SUBSTR,$(GETVAR,DWGNAME),10,1),"."),$(SUBSTR,$(GETVAR,DWGNAME),7,2),$(SUBSTR,$(GETVAR,DWGNAME),7,3))
should work
--
Saludos
Marco Jacinto
"Rick Keller" escribió en el mensaje news:423086f4_3@newsprd01...
>
> I am trying to place a field in a piece of text that gets the sheet number
> from the filename.
>
> My file name.... 05015-S4.dwg.
>
> $(SUBSTR,$(GETVAR,DWGNAME),7,2)
>
> Will return S4
>
> and if I have a filename of 05015-S15
> I know how to get S15
>
> $(SUBSTR,$(GETVAR,DWGNAME),7,3)
>
> I just cant figure out how to write an IF statement to work for both, here
> is what I have so far:
>
> $(IF,$(=,$(SUBSTR,$(GETVAR,DWGNAME),10,1),"."),$(SUBSTR,$(GETVAR,DWGNAME),7,2),$(SUBSTR,$(GETVAR,DWGNAME),7,3))
>
> it returns.... $(IF,??)
>
>
>
> Rick
>
>
>