Cannot get the right Sheet-metal template after installing a language pack

Cannot get the right Sheet-metal template after installing a language pack

Anonymous
Not applicable
369 Views
2 Replies
Message 1 of 3

Cannot get the right Sheet-metal template after installing a language pack

Anonymous
Not applicable

Hi everybody!

I'm having a small problem with this code, something that must work on sheet-metal parts.

My plugin must check if the current document is a Sheet-metal part, if not, it tries to open a new Sheet-metal document using the right template.

 

if (m_AddIn.m_Application.ActiveDocumentType == DocumentTypeEnum.kPartDocumentObject)
{
    m_curDoc = m_AddIn.m_Application.ActiveDocument as PartDocument;
    if (m_curDoc != null)
        if (m_curDoc.SubType != "{9C464203-9BAE-11D3-8BAD-0060B0CE6BB4}") 
m_curDoc = null; }
if (m_curDoc == null) // either kNoDocument or not a sheet-metal part { // find a sheet-metal template String szTemplateFile = m_AddIn.m_Application.FileManager.GetTemplateFile(DocumentTypeEnum.kPartDocumentObject, SystemOfMeasureEnum.kDefaultSystemOfMeasure, DraftingStandardEnum.kDefault_DraftingStandard, "{9C464203-9BAE-11D3-8BAD-0060B0CE6BB4}"); // open new sheet-metal document m_curDoc = m_AddIn.m_Application.Documents.Add(DocumentTypeEnum.kPartDocumentObject, szTemplateFile, true) as PartDocument; }

That code worked well for many years, with different versions of Inventor, but always without localization. This year I installed Inventor 2017 and also the Italian language pack, and this code now don't work anymore, since GetTemplateFile() now return null.

I did a clean install in a new machine and I can confirm the problem arises ONLY AFTER installing the language pack.

 

My best guess is that the GUID for the Sheet-metal template have somewhat changed, but if I manually open a new sheet-metal part document before launching the plug-in, the SubType is still the same (I tried different versions, both metric and english units).

I tried to search that GUID in registry but is nowhere to be found, so really I don't know how Inventor associate that GUID with the right template.

 

Does anyone know how templates are associated with that GUID?

May I use something else instead of that GUID to get the right Sheet-metal template?

Is there another way to create a sheet-metal part without using the template GUID?

Anyone had same problem after installing a language pack?

 

Thank you!

0 Likes
Accepted solutions (1)
370 Views
2 Replies
Replies (2)
Message 2 of 3

adam.nagy
Autodesk Support
Autodesk Support
Accepted solution

Hi,

 

Thank you for reporting it. Now it is logged in our system as item #141016

 

Sorry about the inconvenience 😞

 

Looking at some discussions it seems that it only happens if you installed the English version first then an LP (Language Pack). If you install the final language version straight away instead then this issue does not happen. 

 

How usual is it for the users of your code to have the LP installed separately? - i.e. how big an issue is it?

 

Cheers,



Adam Nagy
Autodesk Platform Services
0 Likes
Message 3 of 3

Anonymous
Not applicable

mmh, never thought about that. I mean, as member of ADN I usually download and install software from there and Suites are distributed only in English, so I have to install LP separately.

Many of my customers should have Inventor Pro already localized, but... is it really such a difference? I mean, while installing from localized media I see that during the install process it installs the language pack as separated package... I believed was the standard procedure now, to install the LP over a standard English release...

However I should check, I should also ask their SysAdmins from which media they install the software. I sure they are under subscription, but it's a while I do not support their annual upgrades.

 

For my development machine I'll try to find a localized media and try to reinstall Inventor from there... if it works I've found a workaround, because until now I haven't published any plugins for Inventor, so I don't really need a stock English version installed like I need for AutoCAD to check plugins before publishing.

 

So, this is second bug I found this year, did I get a medal? (Muttley docet Smiley Very Happy)

0 Likes