cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

WGM with Inventor: how to map custom parameters from Inventor to Windchill if the parameter contains a special character like a spacing

jvankoetsem
7-Bedrock

WGM with Inventor: how to map custom parameters from Inventor to Windchill if the parameter contains a special character like a spacing

I'm investigating the use of the WGM with Inventor.

The Inventor files carry a number of custom parameters of which some have a parameter name that contains a blank space, e.g. 'Treatment process"

Problem now is how to define a Windchill attribute (in version 10.2) so I can capture the value of this parameter.

Any parameter that has a name which does not carry a special character and so complies to the rules of Windchill attribute definition can be captured easily (either implicitly or explicitly).

ACCEPTED SOLUTION

Accepted Solutions

After retesting it seems it does work by explicit attribute mapping after all.

The internal IBA name in Windchill cannot contain any special characters like blanks, but when using explicit mapping for an authoring application (in this case Inventor) and entering the proper (case-sensitive) name of the targeted parameter, after checking-in the Inventor file, the parameter value is properly propagated into the IBA.

View solution in original post

13 REPLIES 13

After retesting it seems it does work by explicit attribute mapping after all.

The internal IBA name in Windchill cannot contain any special characters like blanks, but when using explicit mapping for an authoring application (in this case Inventor) and entering the proper (case-sensitive) name of the targeted parameter, after checking-in the Inventor file, the parameter value is properly propagated into the IBA.

BenPerry
15-Moonstone
(To:jvankoetsem)

Jan Van Koetsem,

Can you show an example screenshot in Type/Attribute Manager. We are looking at putting Inventor files into our Windchill instance. A quick screenshot might be sufficient to get me started without having to "open the book". Thanks!

Hi Ben,

In type & attribute manager, add an attribute to the CAD type as normal. Once added (and still in edit mode) select the newly added attribute and in the top-right window, search for the application you want to connect with (in this case Autodesk Inventor). In the field next to the application's label, enter the name of the attribute as defined in the application.

Inventor attribute mapped to Windchill.JPG

After a "save" and "done you're set to go

BenPerry
15-Moonstone
(To:jvankoetsem)

Jan,

I got that part. I was a little more curious of an example attribute - the syntax specifically. For example, is a value such as "iProperties.mass" appropriate? Or maybe just "mass"? I'm not sure.

Thanks!

JHall
16-Pearl
(To:BenPerry)

@BenPerry   Did you ever figure out what syntax to use for Inventor?  I'm also trying to extract Mass from the Inventor File to Windchill.

 

James

BenPerry
15-Moonstone
(To:JHall)

No @JHall, I didn't get it figured out.  Sorry.

pmooteri
14-Alexandrite
(To:JHall)

Hi @JHall@BenPerry,

Attaching  snapshot from the Windchill Help Guide. Hope it resolves your query.

Regards,
Pankaj

 

 

JHall
16-Pearl
(To:pmooteri)

Thanks @pmooteri  I've used exactly that mapping and my PTC Partner reviewed the attribute, but still it does not function.  We can't figure out why.  😞

James

HJ1
15-Moonstone
15-Moonstone
(To:JHall)

Hi!

Probably shouldn't step in yet as we're not quite there yet, but I'm testing something like this:

- In order to get the attribute linked to Windchill it should be in iProperties in Inventor. To do this add for the .ipt iLogic rule:

 

iProperties.Value("Custom","Mass")=iProperties.Mass

 

- in Windchill Type and Attribute Management create IBA "Mass", add to CAD doc, on the right pane map to Inventor attribute "Mass"

- add to CAD layouts

 

Interested to hear how you finalise this, if it helps   😉

 

JHall
16-Pearl
(To:HJ1)

@HJ1

 

This looks very interesting, thank you for "jumping in".  I'm going to attempt to try this method.  Let me know what you have discovered!

Thanks, James

HJ1
15-Moonstone
15-Moonstone
(To:JHall)

I'll update the latest as there's something hopefully someone can help with.

 

First a small correction, Windchill reads Inventor iProperties Custom tab.

- In order to get the attribute linked to Windchill it should be in iProperties Custom tab in Inventor. To do this add for the .ipt iLogic rule: 

iProperties.Value("Custom","Mass")=iProperties.Mass

- Current test .ipt shows that you need to right click on iLogic rule and Run for the value to update to iProperties. Then check-in and in Windchill it goes. Of course it would be better if there's no need to remember this, but I don't know if it's possible to 'autorun' iLogic rules?

 

Then the issues with attribute type:

- Default Type in Inventor for Mass is "Number".

In Windchill you have options

- "Integer Number": won't work if mass less than 0

- "Real Number": default modeled constraint gives range from -1.E100 to 1.E100 which in the end, well, looks stupid.

- "Real Number" with units I haven't tested, we always have kg so wouldn't really need units.

- "String" failed in check-in as the source is "Number".

 

As we have two MCADs for the other one we have already defined Windchill attribute Weight as String where source is Text. Of course, I would like to use the same attribute for Inventor data. We use wtParts with Weight.

 

 

EDIT: 

I deleted some of my rambling earlier today but leave some in case someone is struggling with the types. In our case I found how to convert type Number to Text/String in Inventor iLogic rule, as an example:

 

iProperties.Value("Custom","Mass")=Str(Round(iProperties.Mass,4))

Still have to make sure the value comes out correct, but this looks promising.

 

Also, there seems to be functionalities in Inventor to launch iRules, "Rules Triggered by Events".

JHall
16-Pearl
(To:HJ1)

@HJ1

"Rules Triggered by Events" looks fascinating.

So I wonder if we could create a completely different attribute in Windchill and somehow use your "convert type Number to Text/String in Inventor" method to populate it?  It could be named anything in Windchill I suppose and populated as a string.

James

HJ1
15-Moonstone
15-Moonstone
(To:JHall)

@JHall

 

You got my drift correct. I only hope I’m right  (disclaimer regarding everything typed here forth 😉

 

There could be global attribute “Weight” of type String in Windchill. In Type and Attribute management you can define per MCAD which attribute from a particular authoring application populate your EPMDoc attribute. As an example, "Weight" in Windchill is mapped to ‘the other’ cad's "Weight" and Inventor's "Mass". The same “Weight” is on wtPart layouts also and populated based on EPMDoc.

 

Also, I think that by iLogic rule you could name whichever the attribute in Inventor iProperties Custom tab. “Mass” I understand is Inventor parameter, but as you’re defining Custom property attribute it could be anything and the rule populates Mass parameter value to your custom attribute in Inventor. So, you could also do like this:

iProperties.Value("Custom","Weight")=Str(Round(iProperties.Mass,3))

Then in Windchill you could map Inventor Weight to Windchill Weight.

 

I’ve now defined also iTriggers of type “Any model parameter change” and “Before Save Document” to run the iLogic rule to update mass automatically to iProperties.

 

I've put this together to a .ipt template stored in Windchill context Templates, created a new CAD doc with that and it seemed to work. However, I got some error message

"Data Acquisition from Pro-Engineer failed. Error message:getAttributesRowsForOidsJsonAjax() returned null"...

 

there's always something, isn't there..??

 

However, Merry Christmas!  😄

Announcements


Top Tags