DTM Transfer - File names exporting without file extension?

DTM Transfer - File names exporting without file extension?

Charlie-24
Enthusiast Enthusiast
888 Views
7 Replies
Message 1 of 8

DTM Transfer - File names exporting without file extension?

Charlie-24
Enthusiast
Enthusiast

Hi,

 

We manufacture sheet metal parts using Radan and export our flat patterns from inventor into Radan using the DTM plugin. 

 

Whenever we transfer a file the filename from the top of the history tree is exported as the part name and etched onto the part using a macro. 

1.JPG2.JPG

as you can see the .ipt is transferred through with the part and is then used in the file name and etched onto the part unless removed manually.

 

3.JPG4.JPG

 Is there a way of turning the extension off inside inventor?

 

We have tried hiding the file extensions in windows but it is still picking it up. 

 

We can manually remove the .ipt but this is usually overlooked creating double work as we go back to remove it. Sorry if this is trivial but we do it on a lot of parts so the time it takes adds up.

0 Likes
Accepted solutions (2)
889 Views
7 Replies
Replies (7)
Message 2 of 8

CCarreiras
Mentor
Mentor

I guess... This could be done with iLogic.

Post this issue in the Inventor logic forum.

CCarreiras

EESignature

Message 3 of 8

WCrihfield
Mentor
Mentor

Hi @Charlie-24.  I'm not familiar with the dialog showing in your post, or whatever 'Radan' is, or the 'DTM plugin' you mentioned, but it sounds to me like the macro is using the Document.DisplayName, which is a Read/Write Property of the Document object in the Inventor API model.  By default, that property contains the file name, without path, but with file extension.  There may be a setting somewhere that can control its behavior to a certain degree, but I can't remember where I might have seen it.  Anyways, if you have access to the 'macro' that is grabbing that property, you could very easily strip the file extension off the end of it, before using it.  Is this 'macro' in VBA, or are you referring to an iLogic rule, or is it part of the plug-in (maybe vb.net or c#)?

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

Message 4 of 8

Curtis_Waguespack
Consultant
Consultant
Accepted solution

Hi @Charlie-24 

 

As @WCrihfield mentioned the app is likely just using the Displayname. You might contact them to see if they can add an option to remove the extension, etc.

 

Otherwise I suppose you could use something like this iLogic rule to toggle the extension off, then run the export app, then run this rule again to turn it back on. 

 

I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com

 

If ThisDoc.Document.DisplayNameOverridden = True Then
	 ThisDoc.Document.DisplayNameOverridden = False
Else
	ThisDoc.Document.DisplayName = _
		ThisDoc.FileName(False) 'without extension
End If

 

EESignature

Message 5 of 8

Charlie-24
Enthusiast
Enthusiast

Thank you @WCrihfield and @Curtis_Waguespack 

 

Unfortunately the plugin is a standalone app from the developers so I don't have access to its code, and they have been unable to fix it so far 🤞

 

Thank you very much for the ilogic code, I have added it as an external rule and tested it successfully

0 Likes
Message 6 of 8

Charlie-24
Enthusiast
Enthusiast

@Curtis_Waguespack Is there a way of making the rule only remove the .ipt and not add it back in?

 

Apologies for the silly question but i have extremely limited VB and ilogic knowledge

 

My plan is to assign the rule to and event trigger (Before save) so that any new parts will automatically run the rule 

 

 

Many thanks

 

Charlie

0 Likes
Message 7 of 8

WCrihfield
Mentor
Mentor
Accepted solution

Hi @Charlie-24.  Here is something you can use for that.  This code simply sets the value of the 'DisplayName' to the file's name, without the file extension.  Keep in mind that this code may only work properly after the file has been saved to disk for the first time, because before that, it will not have a file name yet.  But I don't think it will throw an error or anything like that if the file has not been saved before yet, because newly created files already have a value for the DisplayName property, and retrieving the file name this way will just return an empty String when it has not been saved yet.

ThisDoc.Document.DisplayName = ThisDoc.FileName(False)

 

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes
Message 8 of 8

Charlie-24
Enthusiast
Enthusiast

@WCrihfield That's perfect! Thank you so much for your help!

0 Likes