Community
Inventor Forum
Welcome to Autodesk’s Inventor Forums. Share your knowledge, ask questions, and explore popular Inventor topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Part Measure gets planes

23 REPLIES 23
SOLVED
Reply
Message 1 of 24
fgarcia90
1398 Views, 23 Replies

Part Measure gets planes

I've created Costum properties, parameters, to get the outside measure of the parts and it works fine until we create and leave activated a work plane outside the part so it measures not until the end of the part but until the plane.

Any clues how to only measure the part itself?

TIA

FG

23 REPLIES 23
Message 2 of 24
cbenner
in reply to: fgarcia90
Message 3 of 24
fgarcia90
in reply to: cbenner

see images please.

I want to put planes but the measure as to be as without because I just want the measure of the part.

 

Thanks

Message 4 of 24
cbenner
in reply to: fgarcia90

Message 5 of 24
fgarcia90
in reply to: fgarcia90

yes see jpg please

thanks

Message 6 of 24
Cadmanto
in reply to: fgarcia90

It seems to me that what ever that perameter is, it is somehow linked to the plane.  You might want to link it to a point instead.  That way when planes get added this perameter is uneffected.

 

check.PNGIf this solved your issue please mark this posting "Accept as Solution".

Or if you like something that was said and it was helpful, Kudoskudos.PNG are appreciated. Thanks!!!! Smiley Very Happy

Inventor.PNG     vault.PNG

Best Regards,
Scott McFadden
(Colossians 3:23-25)


Message 7 of 24
swhite
in reply to: fgarcia90

Does that accurately get extents if it is an angled surface, or does this only work well for square stuff?

Steven White
Lee C. Moore, Inc.
www.lcm-wci.com
Inventor 2011
Intel Dual Xeon E31225 @ 3.1 GHz CPU
16 GB RAM
NVIDIA Quadro 600 GPU
Windows 7 - 64 Bit
Message 8 of 24
fgarcia90
in reply to: swhite

it works fine with comples forms but when I apply a plane it measures to the plane...

Message 9 of 24
fgarcia90
in reply to: Cadmanto

Can't because the part can be out of that point... today can be need the Center Point but tomorrow can be far...

TIA

 

FG

Message 10 of 24

Hi fgarcia90,

 

You can toggle the work plane visibility so that it won't be measured:

 

oDoc = ThisDoc.Document

   'toggle work plane visibility
    For Each oWorkPlane In oDoc.ComponentDefinition.WorkPlanes
    If oWorkPlane.Visible = True Then
    oWorkPlane.Visible = False
    End If
    Next

Atrav_x = Measure.ExtentsLength
Atrav_y = Measure.ExtentsWidth
Atrav_z = Measure.ExtentsHeight

MessageBox.Show(Atrav_x  & vblf & Atrav_y & vblf & Atrav_z, "iLogic")

 

If you need the work planes that were visible to be toggled back on after measuring, let me know and I'll post another example.

 

I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com

Message 11 of 24

Curtis,

 

I'd like to see that "toggle back" example.  I'm working on a very similar rule, to be used for automatic descriptions of steel plates.  I've run into the same sort of issue with workplanes messing up the dimensions.

 

Fortunately we don't have workplanes off to the side of our plate parts too often - unfortunately, that means on that rare occasion when it DOES happen, nobody would be looking for it until it caused a shop problem.

Message 12 of 24
swhite
in reply to: jtylerbc

Do you do alot of spliting? We have set parameters in our parts for length, width, height etc and simply assign the related parameter value for whatever l,w,&h we set for the plates. G_L = 6 for example. The only time I really need inventor to get it for me is if I split a part or otherwise change its overall dimensions outside of the sketch. And sometimes FG will not give the correct length and have to add a sketch to get the length. Otherwise my plate template is set to get whatever the dimensions for the plate as entered.

Steven White
Lee C. Moore, Inc.
www.lcm-wci.com
Inventor 2011
Intel Dual Xeon E31225 @ 3.1 GHz CPU
16 GB RAM
NVIDIA Quadro 600 GPU
Windows 7 - 64 Bit
Message 13 of 24
jtylerbc
in reply to: swhite

No, not a lot of splitting, but much revising of plate shapes.

 

We have been using a method similar to what you are describing, with a construction-geometry box with reference dimensions, which is then constrained to the sketch profile to form a bounding box.  The problem I've found is that this is very easily messed up by the user, either by them deleting the construction geometry / dimensions, or forgetting to reconstrain it to the new profile after a shape change.

 

I'm working on improving upon that method using a rule very similar to what the OP of this thread seems to be doing, with exactly the same problem he is asking about.  The rule does what I want it to do, with the exception that it includes work planes in the extents if they are left visible.  The finished version of the rule will be in our template files.  I just want to get rid of this one final flaw before I release it to general use in my company.

 

Message 14 of 24

Hi jtylerbc,

 

Here's an example that turns off and on any work feature that is on to start with. This works by adding the work feature names to an array list as they are turned off, and then using that list to turn them back on after the measurement is taken.

 

I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com

 

oDoc = ThisDoc.Document

Dim MyArrayList As New ArrayList

'toggle work plane visibility off
For Each oWorkPlane In oDoc.ComponentDefinition.WorkPlanes
    If oWorkPlane.Visible = True Then
    oWorkPlane.Visible = False
    'add workplane to the array list
    MyArrayList.add(oWorkPlane.name)   
    End If
Next

'toggle work axes visibility off
For Each oWorkAxis In oDoc.ComponentDefinition.WorkAxes
    If oWorkAxis.Visible = True Then
    oWorkAxis.Visible = False
    'add workplane to the array list
    MyArrayList.add(oWorkAxis.name)   
    End If
Next

'toggle work points visibility off
For Each oWorkPoint In oDoc.ComponentDefinition.WorkPoints
    If oWorkPoint.Visible = True Then
    oWorkPoint.Visible = False
    'add workplane to the array list
    MyArrayList.add(oWorkPoint.name)   
    End If
Next

'get measurements
Atrav_x = Measure.ExtentsLength
Atrav_y = Measure.ExtentsWidth
Atrav_z = Measure.ExtentsHeight

'show measurements
MessageBox.Show(Atrav_x  & vblf & Atrav_y & vblf & Atrav_z, "ilogic")

'toggle work plane visibility back on
For Each oWorkPlane In oDoc.ComponentDefinition.WorkPlanes
    If MyArrayList.contains(oWorkPlane.Name) = True Then
    oWorkPlane.Visible = True
    End If
Next

'toggle work axes visibility back on
For Each oWorkAxis In oDoc.ComponentDefinition.WorkAxes
    If MyArrayList.contains(oWorkAxis.Name) = True Then
    oWorkAxis.Visible = True
    End If
Next

'toggle work points visibility back on
For Each oWorkPoint In oDoc.ComponentDefinition.WorkPoints
    If MyArrayList.contains(oWorkPoint.Name) = True Then
    oWorkPoint.Visible = True
    End If
Next

 

Message 15 of 24

Both of you are "bad ****", you rule 🙂

 

I made simple changes in your codes like showned above

Thanks for all quick responses

And I'm Portuguese, not Spanish loooool

 

FG

 

oDoc = ThisDoc.Document

Dim FGLista As New ArrayList

'desligar a visibilidade dos workplanes
For Each oWorkPlane In oDoc.ComponentDefinition.WorkPlanes
	If oWorkPlane.Visible = True Then
	oWorkPlane.Visible = False
	' adicioná-los à lista
	FGLista.add(oWorkPlane.Name) 
	End If
Next

'desligar a visibilidade dos eixos
For Each oWorkAxis In oDoc.ComponentDefinition.WorkAxes
	If oWorkAxis.Visible = True Then
	oWorkAxis.Visible = False
	' adicioná-los à lista
	FGLista.add (oWorkAxis.Name) 
	End If
Next

' desligar a visibilidade de todos os pontos
For Each oWorkPoint In oDoc.ComponentDefinition.WorkPoints
	If oWorkPoint.Visible = True Then
	oWorkPoint.Visible = False
	' adicioná-los à lista
	FGLista.add(oWorkPoint.Name) 
	End If
Next

'sacar as medidas
Atrav_x = Measure.ExtentsLength
Atrav_y = Measure.ExtentsWidth
Atrav_z = Measure.ExtentsHeight

'ligar a visibilidade dos workplanes
For Each oWorkPlane In oDoc.ComponentDefinition.WorkPlanes
	If FGLista.contains(oWorkPlane.Name) = True Then
	oWorkPlane.Visible = True
	End If
Next

'ligar a visibilidade dos eixos
For Each oWorkAxis In oDoc.ComponentDefinition.WorkAxes
	If FGLista.contains(oWorkAxis.Name) = True Then
	oWorkAxis.Visible = True
	End If
Next

'ligar a visibilidade de todos os pontos
For Each oWorkPoint In oDoc.ComponentDefinition.WorkPoints
	If FGLista.contains(oWorkPoint.Name) = True Then
	oWorkPoint.Visible = True
	End If
Next

 

Message 16 of 24
swhite
in reply to: jtylerbc

We have a plate template that just makes a 10x10x1 inch plate by default, to which we change the parameters. We only add sketches to make cutouts, etc but never change the original sketch geometry at all.

Steven White
Lee C. Moore, Inc.
www.lcm-wci.com
Inventor 2011
Intel Dual Xeon E31225 @ 3.1 GHz CPU
16 GB RAM
NVIDIA Quadro 600 GPU
Windows 7 - 64 Bit
Message 17 of 24

Curtis, that's fantastic.  It resets the visibility so quickly I had to put in an "OK" box just to see the planes hide in my test model.  Most of my users will never know what sort of majic is making their parts work.

 

A little testing and some integration with my current code, and I'll have fully automatic descriptions for all my plate models.

Message 18 of 24
swhite
in reply to: fgarcia90

Would this code go in the part templates or the assembly template?

Steven White
Lee C. Moore, Inc.
www.lcm-wci.com
Inventor 2011
Intel Dual Xeon E31225 @ 3.1 GHz CPU
16 GB RAM
NVIDIA Quadro 600 GPU
Windows 7 - 64 Bit
Message 19 of 24

Curtis,

 

Just wanted to pop back in and share something one of my coworkers and I discovered.

 

We often have copied surface bodies to make adaptive notches in our plates (generally for an interface with another plate).  We found in our testing that these surface bodies, if left visible, caused the same problem with measured extents that the work planes were causing.  In his attempt to find a way to shut off the visibility of the surface bodies, he stumbled across something that not only works, but is an easier way to deal with the work features as well.

 

Rather than identifiying visible work features, turning them off, and storing them in an array to be reactivated later, this uses iLogic to turn off the Object Visibility (from the View tab), then turn it back on.

 

' To turn work feature visibility off before the measurement
oDoc
.ObjectVisibility.AllWorkFeatures=False


' To turn visibility back on after the measurement
oDoc.ObjectVisibility.AllWorkFeatures=True

This seems to have the same effect on the extents measurement as your code, but is much shorter.  Additionally, we're able to modify these lines to shut off anything listed in the Object Visibility dropdown, including Construction Surfaces, which resolves our copied surface issues.

Message 20 of 24
swhite
in reply to: jtylerbc

True, but I believe the previous code would allow turning those features off and leaving them off, while the view function is a temporary thing and turns all planes baxck on, even the ones you may not want.

Steven White
Lee C. Moore, Inc.
www.lcm-wci.com
Inventor 2011
Intel Dual Xeon E31225 @ 3.1 GHz CPU
16 GB RAM
NVIDIA Quadro 600 GPU
Windows 7 - 64 Bit

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

Post to forums  

Autodesk Design & Make Report