Skip to Content
avatar image
Former Member

Map an original filename as the DIR number in Import without using file properties.

I want to derive the filename and map to the document number field in the import dialog without the requirement of creating, mapping and entering a custom file property? Is there an attribute that is usable by the import that maps the original filename?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Dec 21, 2017 at 10:45 AM

    Hi Neal,

    I'm not sure, if I completely got your question. I'm also assuming you are talking about SAP ECTR.

    Do you want to:

    1. use the filename as DIR number (external numbering)
    2. rename the file to the new DIR number (e.g. file box.prt gets renamed to 12345678.prt
    3. map the filename into an attribute in the DIR

    Is your goal to preserve the filename?

    Maybe you can also add a screenshot.

    Thanks,

    Gerhard

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thank you for your answers. I was hoping there was some method to capture the filename without the use of a custom property. I wanted to avoid the overhead of having to create a property in legacy files that have been stored offline. I will contact the vendor and share any positive developments.

      Information for others that may read this thread...

      In my case, I use the following xml to capture the value in the NUMBER property in Solidworks. The value is case sensitive and we have many groups working together an so I have included multiple values and use the first non empty value for the mapping.

      In Solidworks itself, the property is written as $PRP:"SW-File Name" this is an environmental variable the evaluates as the filename.

      For groups of multiple files, I use the SolidWorks Task Scheduler>Custom Properties Update utility to apply the $PRP:"SW-File Name" value to all files in a folder.

      <section name="SLWMDE" description="Model mapping from SOLIDWORKS 3D to SAP">   
      		<APPL_ATTRIBUTE name="_DOCNUMBER">
      			<FIRSTNONEMPTY>
      				<APPL_ATTRIBUTE name="NUMBER"/>
      				<APPL_ATTRIBUTE name="Number"/>
      				<APPL_ATTRIBUTE name="number"/>
      			</FIRSTNONEMPTY>
      		</APPL_ATTRIBUTE>