Skip to main content

I'm trying to create a user parameter that consists of the filepath, 'Output', and filename to be used in the writer

What writer are you using? The reason i ask is different writers set the file name in different places.

eg, Excel and GDB set the file name under the writer instance in the navigator, and the writer on the canvas sets the name of the sheet or feature class you writer to.

 

A csv on the other hand, you specify the output folder in the navigator, and the csv filename on the canvas


AutoCAD Reader and AutoCAD Writer as well as an Excel Writer. I want the string that has the output path and filename to be a parameter for both Writers


I've tried using FilenamePartExtractor and StringConcatenator to construct the correct output string: "C:\\_Projects\\DFW\\Output\\" (Constant in SC) + _filename (Attribute in SC). This not available as a parameter since it is not established until runtime. I need to set this up as a user parameter.


  • create a user parameter.
  • give the value whatever you want.
  • inside workspace , use transformer ParameterFetcher
  • fetch the parameter value to variable or attribute
  • use that attribute in writer

  • create a user parameter.
  • give the value whatever you want.
  • inside workspace , use transformer ParameterFetcher
  • fetch the parameter value to variable or attribute
  • use that attribute in writer

Thank you for this help. I think this will work.

  • I have created a User Parameter (attribute type, published ?, not required?, no default value?) named Output_dwg
  • After StringConcatenator I assign _result to Output_dwg in a ParameterFetcher
  • In the AutoCAD Writer I set the destination to the Output_dwg

At runtime I get the following error message: MULTI_WRITER: No dataset was specified for MULTI_WRITER_DATASET or ACAD_1_DATASET or ACAD_DATASET

Is there a way to inspect a user parameter during the program execution?

 


Thank you for this help. I think this will work.

  • I have created a User Parameter (attribute type, published ?, not required?, no default value?) named Output_dwg
  • After StringConcatenator I assign _result to Output_dwg in a ParameterFetcher
  • In the AutoCAD Writer I set the destination to the Output_dwg

At runtime I get the following error message: MULTI_WRITER: No dataset was specified for MULTI_WRITER_DATASET or ACAD_1_DATASET or ACAD_DATASET

Is there a way to inspect a user parameter during the program execution?

 

You should give the acad name for the user parameter(default value)

 

you can see the value of attribute while fme is running....

Right click on link / line between transformers and add breakpoint

make sure that stop at break point setting is ON (menu - run - stop at breakpoint)

 

I attached one fme workbench for your ref

 

 

 


Thank you for this help. I think this will work.

  • I have created a User Parameter (attribute type, published ?, not required?, no default value?) named Output_dwg
  • After StringConcatenator I assign _result to Output_dwg in a ParameterFetcher
  • In the AutoCAD Writer I set the destination to the Output_dwg

At runtime I get the following error message: MULTI_WRITER: No dataset was specified for MULTI_WRITER_DATASET or ACAD_1_DATASET or ACAD_DATASET

Is there a way to inspect a user parameter during the program execution?

 

Putting the user parameter in the default value help but the ParameterFetcher is not correct. Seems like both the Parameter Name and Target Attribute only accepts parameter. When I try _result in either it does not work. Not sure why it is called Target Attribute when it won't accept the _result attribute from the StringConcatenator directly before.


I'm trying to set a User Parameter with an Attribute at runtime. It appears that ParameterFetcher will do only the opposite: set an attribute to the value of a parameter. Is there a transformer that will allow the setting a a user parameter at runtime? I don't see anyother parameter transformer in the gallery.


I'm trying to set a User Parameter with an Attribute at runtime. It appears that ParameterFetcher will do only the opposite: set an attribute to the value of a parameter. Is there a transformer that will allow the setting a a user parameter at runtime? I don't see anyother parameter transformer in the gallery.

variable setter and variable retriever


I not having problems setting the variable. Just can't get the variable to be read in the Writer as the file destination.

I set up the User Parameter as Output_filename. Then I set Destination AutoDesk AutoCAD DWG/DXF default file to this parameter. Then I'm using the output from StringConcatenator to assign the output filename and path to the user parameter Output_filename.

Setting the User Parameter Output_filename

imageSetting the default value to $(Output_filename)

imageThe results from StringConcatenator is assigned to $(Output_filename)

imageBefore I run the FMW I examine the output setting.

imageWhen I run it I get the following:

imageThe Translation fails with this error:

MULTI_WRITER: No dataset was specified for MULTI_WRITER_DATASET or ACAD_2_DATASET or ACAD_DATASET

 

 


Thanks for all (everyone that contributed) your help. I tried using the FeatureWriter set to AutoCAD DWG/DXF and this seems to be working well. This writer provides the flexibility to use an attribute to set the output drawing path and filename. I could not get the parameter in the native AutoCAD DWG/DXF writer to work and I think there may be something wrong with this writer (perhaps worth further investigation). Thanks again.


Reply