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: 

Ilogic : Perform a CODE using iproperty information

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
Anonymous
455 Views, 3 Replies

Ilogic : Perform a CODE using iproperty information

Hi

I want to use Ilogic to construct a code part name.

My question is perform a code of about 12 characters. For example the parameter "Lenght" is 600mm but in the expressione result It must be "000000000600" (a string of 12 characters)

 

Thank you in advance

Fabio

3 REPLIES 3
Message 2 of 4
Anonymous
in reply to: Anonymous

I'm kinda bored waiting for a reply to my own thread, hence spamming what might not be replies to peoples questions, anyway:

 

Private Sub TestFormat()
    Dim length As Integer
    length = 600
    Dim code As String
    code = Format(600, "000000000000")
End Sub

 

Message 3 of 4
Anonymous
in reply to: Anonymous

Thank you very much and sorry if I read your response delay

Tomorrow I'll test it

Regards

Fabio

Message 4 of 4
Anonymous
in reply to: Anonymous

Yes it work so fine but if my "lengt" is not a number.

For ex: "A600" and i wont to convert it in "00000000A600"

Regards

Fabio

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

Post to forums  

Autodesk Design & Make Report