Inventor Customization

Inventor Customization

Reply
Distinguished Contributor
envisage
Posts: 113
Registered: ‎10-30-2003
Message 1 of 2 (100 Views)

Trap first sketch dimension

100 Views, 1 Replies
12-21-2007 07:08 AM
Is it possible to trap the first created sketch dimension of a part and interogate it?

If so, what do I need to use?

Thanks in advance, Dave
*Teun Ham \(IV10 SP3 / IV2008 SP1\)
Message 2 of 2 (100 Views)

Re: Trap first sketch dimension

12-21-2007 07:24 AM in reply to: envisage
Sub CheckFirstDimension()

Dim oPartDoc As PartDocument
Set oPartDoc = ThisApplication.ActiveDocument

Dim oCompDef As PartComponentDefinition
Set oCompDef = oPartDoc.ComponentDefinition

Dim oSketch As PlanarSketch
Set oSketch = oCompDef.Sketches(1)

Dim oFirstDimension As DimensionConstraint
Set oFirstDimension = oSketch.DimensionConstraints(1)

Debug.Print "Properties of the first dimension:"
Debug.Print "Name = " & oFirstDimension.Parameter.Name
Debug.Print "Value = " & oFirstDimension.Parameter.Value

End Sub


--
T. Ham
CAD Automation & Systems Administrator
CDS Engineering BV

HP xw4300 Workstation
Dual Pentium XEON 3.6 Ghz
4 GB SDRAM
NVIDIA QUADRO FX 3450/4000 SDI (Driver = 6.14.10.9185)
250 GB SEAGATE SATA Hard Disc
3Com Gigabit NIC

Windows XP Professional SP2
Autodesk Inventor Series 10 SP3a
Autodesk Inventor Suite 2008 SP1
--
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.