Skip to main content

 

Value in Source Data:

DWGNAME,OLDHANDLE,NEWHANDLE,X1,Y1,TYPE,NEW_ID

BDCV.dwg,3F7,16354,2181887.040872167,12004078.93869873,ROUTE,1233345

The String replacer is defined like $(DrawPath)@Value(DWGNAME)

Output from transformer:

If DrawPath Parameter=C:\\ClientMaps\\

C:\\ClientMaps DEFAULT_MACRO FME_DATA_REPOSITORYBDCV.dwg

if DrawPath Parameter=C:\\ClientMaps

C:\\ClientMapsBDCV.dwg

 I need the output to be C\\ClientMaps\\BDCV.dwg

Thanks

Hi @dutchtower​ in the StringReplacer, you can define the Replacement Text parameter to $(DrawPath)\\@Value(DWGNAME) so that the missing backslash is output with your data.

 

Alternatively, what you're trying to do here is much better suited for the AttributeCreator transformer. If I'm misunderstanding your goal or your scenario, please let me know!

image.png


Dan, Thanks for the reply. I tried the backslash in the middle of the string as you suggested before posting the original issue and it does work. I guess I was overthinking it. You know...just in case the File path wasn't Windows-based. I'll nose around a little with the AttributeCreator Transformer too.

Thanks again@


I tried the AttributeCreator and got the same results. If the $(DrawPath) parameter value is C:\\ClientMaps\\, the original DGNAME attribute is BDCV.dwg, the Attribute value in the transformer is $(DrawPath)@Value(DWGNAME) the output is C:\\ClientMaps DEFAULT_MACRO FME_DATA_REPOSITORYBDCV.dwg. Isn't there some way to include the backslash in the User Parameter without is adding the " DEFAULT_MACRO FME_DATA_REPOSITORY"?


I tried the AttributeCreator and got the same results. If the $(DrawPath) parameter value is C:\\ClientMaps\\, the original DGNAME attribute is BDCV.dwg, the Attribute value in the transformer is $(DrawPath)@Value(DWGNAME) the output is C:\\ClientMaps DEFAULT_MACRO FME_DATA_REPOSITORYBDCV.dwg. Isn't there some way to include the backslash in the User Parameter without is adding the " DEFAULT_MACRO FME_DATA_REPOSITORY"?

To fix this issue, go into your User Parameter Manager and change the Text Configuration of the DrawPath User Parameter from Plain Text (Uniline) to Plain Text (Multiline).

image


To fix this issue, go into your User Parameter Manager and change the Text Configuration of the DrawPath User Parameter from Plain Text (Uniline) to Plain Text (Multiline).

image

Thanks...this fixed it!


Reply