Skip to main content
Solved

Writing to File Name created from multiple attributes

  • March 3, 2025
  • 3 replies
  • 69 views

deanhowell
Influencer
Forum|alt.badge.img+24

I am trying to write out to a DWG from multiple inputs and need the output file name to be a combination of variables i.e. 

 

Extract_@Value(lot_number)_@Value(survey_type)@Value(survey_number)_@Trim($(_extractCoordinateSystem),EPSG:)_@DateTimeFormat(@DateTimeNow(), %Y%m%d).dwg

 

The variable creates fine using a variable setter 

 

 

But when I try to run the writer it fails. It appears it is trying to write the file multiple time and fails to overwrite 

 

 

 

Any ideas on how I could set the variable file name better?

Best answer by deanhowell

The result came about needing all ports have the extract file name on it. We discovered that a single port did not and once that was solved the rest was perfect. We ended up merging the initiator with the result for the feature reader.

 

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

donalmateer
Safer
Forum|alt.badge.img+8
  • Safer
  • March 5, 2025

Hi ​@deanhowell,

Thanks for reaching out! If possible would you be able to share the logfile of the workspace? I’d love to investigate further.
If it’s also possible it would be great if you could share the workspace itself and I can try find a solution. (Not a problem if not).

Kind regards,
Donal. 


deanhowell
Influencer
Forum|alt.badge.img+24
  • Author
  • Influencer
  • March 6, 2025

Hello ​@donalmateer I have attached a zip file that contains the log, the workbench and the output. The interesting thing is that if I change the output file name to include the variables it then drops one of the output text layers A-DIST. The workbench creates the _extractfilename early in the workbench and the output is created but it tries then to do a ‘fanout’ -see the end of the log.

Any assistance would be very much appreciated.


deanhowell
Influencer
Forum|alt.badge.img+24
  • Author
  • Influencer
  • Best Answer
  • March 11, 2025

The result came about needing all ports have the extract file name on it. We discovered that a single port did not and once that was solved the rest was perfect. We ended up merging the initiator with the result for the feature reader.