Skip to main content
Solved

Writing to File Name created from multiple attributes


deanhowell
Influencer
Forum|alt.badge.img+23

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.

 

View original
Did this help you find an answer to your question?
This post is closed to further activity.
It may be a question with a best answer, an implemented idea, or just a post needing no comment.
If you have a follow-up or related question, 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+6

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+23
  • 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+23
  • 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.

 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings