Jump to content

Material size (WxLxH) auto update in iProperty


eksiah

Recommended Posts

Hello everyone.

 

i have a request from my tool maker in machine shop and need help on this

 

We need the material size (W x L x H) or (Dia x L) to be automatic updated and shown on idw (title block) so that they can prepare the material easily for squaring process.

 

Possible to have an i-Logic or other method to enable the Inv2012Pro automatic update the (W,L,H) or (Dia,L) when saving the file and before exit ?

 

Very very thanks in advance. smiley42.gif

Link to comment
Share on other sites

hi Kenny,

 

Very thanks for info.

 

Now i need to figure out how it can recalculate automatically if (let say) i extruded another 20mm from one end from original Length.

Link to comment
Share on other sites

I got it!

try running this iLogic rule.

We just need to learn how to apply the message box output to parameters now!

 

Dim Length As Decimal = 0.0

Dim Height As Decimal = 0.0

Dim Width As Decimal = 0.0

 

Length = Measure.ExtentsLength

Height = Measure.ExtentsHeight

Width = Measure.ExtentsWidth

 

Dim SLength As String = Length.ToString()

Dim SHeight As String = Width.ToString()

Dim SWidth As String = Height.ToString()

 

MessageBox.Show("L = " + SLength + vbNewLine + "W = " + SWidth + vbNewLine + "H = " + SHeight , "Part Size")

Link to comment
Share on other sites

Ok I figured it out 2 minutes after posting.

You will need to create 3 custom iProperties.

length

width

height

 

Then run this rule.

 

 

Dim Length As Decimal = 0.0

Dim Height As Decimal = 0.0

Dim Width As Decimal = 0.0

 

Length = Measure.ExtentsLength

Height = Measure.ExtentsHeight

Width = Measure.ExtentsWidth

 

Dim SLength As String = Length.ToString()

Dim SHeight As String = Width.ToString()

Dim SWidth As String = Height.ToString()

 

iProperties.Value("Custom", "length") = SLength

iProperties.Value("Custom", "width") = SWidth

iProperties.Value("Custom", "height") = SHeight

Link to comment
Share on other sites

Hi Kenny,

Very very thanks you for the code :D

 

Really appreciated and i can auto insert it the idw when printing drawings.

 

Below is what i have changed little bit on the codes

 

 

Dim oLength As Decimal

Dim oHeight As Decimal

Dim oWidth As Decimal

 

oLength = Round(Measure.ExtentsLength,2)

oHeight = Round(Measure.ExtentsHeight,2)

oWidth = Round(Measure.ExtentsWidth,2)

 

Dim SLength As String = oLength.ToString()

Dim SHeight As String = oHeight.ToString()

Dim SWidth As String = oWidth.ToString()

 

iProperties.Value("Custom", "Length") = SLength

iProperties.Value("Custom", "Height") = SHeight

iProperties.Value("Custom", "Width") = SWidth

 

'MessageBox.Show("Length = " + SLength + vbNewLine + "Width = " + SWidth + vbNewLine + "Height = " + SHeight , "Part Size")

Link to comment
Share on other sites

You're welcome, I'm glad I could help! It's not often I can actually offer a solution around here. Plus I learned a little bit about iLogic while trying to solve this.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...