Inventor Customization

Inventor Customization

Reply
Active Member
fabio.chiesa
Posts: 8
Registered: ‎09-17-2012
Message 1 of 4 (251 Views)
Accepted Solution

Ilogic : Perform a CODE using iproperty information

251 Views, 3 Replies
09-17-2012 05:39 AM

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

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

 

Valued Mentor
JohanLarsson
Posts: 425
Registered: ‎06-14-2005
Message 2 of 4 (233 Views)

Re: Ilogic : Perform a CODE using iproperty information

09-18-2012 07:29 AM in reply to: fabio.chiesa

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

 

-------------------------------------------------------------------------
Inventor Professional 2012 SP1 (25 seats with subscription)
Windows 7 64 bit
Lenovo D20, 12 GB RAM, Intel Xeon X5687 3.6 GHz, SSD
Quadro 4000, driver 8.17.12.9573, dual monitors
SpacePilot, driver version 6.15.3 Firmware 3.12
Active Member
fabio.chiesa
Posts: 8
Registered: ‎09-17-2012
Message 3 of 4 (208 Views)

Re: Ilogic : Perform a CODE using iproperty information

09-25-2012 09:18 AM in reply to: JohanLarsson

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

Tomorrow I'll test it

Regards

Fabio

Active Member
fabio.chiesa
Posts: 8
Registered: ‎09-17-2012
Message 4 of 4 (193 Views)

Re: Ilogic : Perform a CODE using iproperty information

09-27-2012 03:45 AM in reply to: JohanLarsson

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

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!