Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Inventor description with parameters adds a comma

2 REPLIES 2
Reply
Message 1 of 3
EmilKruse
503 Views, 2 Replies

Inventor description with parameters adds a comma

Hello,

 

In Inventor 2018, I have created some iLogic parts to easily create RHS, SHS, flat iron bars and so on from simple templates.  

I have exported the parameters "height", "width", "thickness" and "length". I then made an expression in the iProperties description to pull the properties in the format  

=RHS <L1>x<L2>x<t> - L=<Length> - <Material>

 

It could then look like this:

RHS 80x40x8 - L=100 mm - Generic

 

This works perfectly on my machine - however, when I decided to upload the templates to Vault Basic and put it on 3 of our other workstations, the returned values on all 3 looks like this:

 

RHS 80,x40,x8, - L=100 mm - Generic

 

...so Inventor adds a comma after each parameter, and I don't understand why.

 

I have done the following to troubleshoot:

 

  • Manually moved the templates and tried on another workstation - no luck
  • Looked in "Document Settings" - found nothing
  • Exported my "Application Options" and loaded them into one of the workstations - didn't work

The only 3 places the comma actually shows is in the

- iProperties Description

- iProperties Custom

- BOM

 

The iLogic rule used is

iLogicForm.Show("Model Data")

and fires upon creating with the template. 

 

I have attached a photo that shows my problem.

 

There might be something simple as a setting I have overlooked but at the moment I am stuck.

 

Has anyone had this issue before and know a fix?

Thanks in advance,

 

 

Inventor adds comma to parameters.jpg

 

 

 

 

 

2 REPLIES 2
Message 2 of 3
HideoYamada
in reply to: EmilKruse

Hi,

 

I could not find where is, but I suspect it is depending on Windows setting.

For example, your Inventor uses ',' (comma) as a floating point, but ours uses '.' (dot).

This can be changed at Control Panel of Windows.

(I changed it to comma, and then Inventor was affected)

 

If you simply add Custom iProperty as number from iProperty dialog, does a comma appear at the end of value?

 

=====

Freeradical

 Hideo Yamada

 

=====
Freeradical
 Hideo Yamada
https://www.freeradical.jp
Message 3 of 3
EmilKruse
in reply to: HideoYamada

Hello,

 

Thanks for your reply - and sorry for my late response.

I forgot to mention that I already took a look there in the "Region" settings, and on at least two of the machines, its the same - it's set to comma. So I ruled that out.

 

If I manually input numbers, no parameters, the comma is not there. It seems as if the comma is something that is "generated" within the parameters somehow.. 

 

Under Parameters->Custom Property Format i have made it as follows:

Property Type = Number

Unit = mm

Precision = 3,123 (3 decimals)

 

Setting the precision to 0 removes the comma in the automated description - so its seems like it adds the comma, even though no precision is actually specified.

 

I just think i found a solution:

 

Under "Custom Property Format" in "Parameters" i set

Property Type = Text

Unit = mm

Precision = 3,123 (3 decimals)

And i leave Units String, Leading/Trailing Zeroes unchecked.

 

I also need to go to iProperties -> "Custom" and modify the "Type" to be "Text" aswell, for all of the parameters.

 

Why it works in one way on one machine, and in another way on the other, I don't know.

And if it has some consequences somewhere I can't tell yet... I will try using it like this for now.

 

Thanks,

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report