Edit Driven Dimension????

Edit Driven Dimension????

Anonymous
Not applicable
714 Views
2 Replies
Message 1 of 3

Edit Driven Dimension????

Anonymous
Not applicable

Hi,

I need to know how to delete or move driven dimensions generated by operations like patterns in a sketch, the driven dimensions make the  very messy sketch. 

It's possible?. Or maybe change the visibility?

0 Likes
715 Views
2 Replies
Replies (2)
Message 2 of 3

YuhanZhang
Autodesk
Autodesk

You can turn off the "Dimension Visibility" in the context menu of a 2D/3D sketch also via API use PlanarSketch/Sketch3D.DimensionsVisible property. Also you can delete them if you need not them via API, you can check DimensionConstraint.Driven and then call DimensionConstraint.Delete if they are driven dimensions.



If this solves the problem please click ACCEPT SOLUTION so other people can find it easily.



Rocky Zhang
Inventor API PD
Manufacturing Solutions
Autodesk, Inc.

0 Likes
Message 3 of 3

bradeneuropeArthur
Mentor
Mentor

Hi,

 

Please use this piece of code:

 

Public Sub dimvis()

Dim a As Application
Set a = ThisApplication

Dim b As PartDocument
Set b = a.ActiveDocument

Dim c As Sketch
Set c = b.ComponentDefinition.Sketches(1)

For Each d In c.DimensionConstraints

If d.Driven = True Then
d.Delete
End If

Next

End Sub

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes