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: 

How to remove all the horizontal and vertical constraints

14 REPLIES 14
SOLVED
Reply
Message 1 of 15
gparamasivam
2477 Views, 14 Replies

How to remove all the horizontal and vertical constraints

gparamasivam
Enthusiast
Enthusiast

Hello Everyone,

How to remove the all horizontal and vertical constraints in all the sketches with single shot or automatically.

If is this possible, Kindly guide me..

 

Advance Thanks...

0 Likes

How to remove all the horizontal and vertical constraints

Hello Everyone,

How to remove the all horizontal and vertical constraints in all the sketches with single shot or automatically.

If is this possible, Kindly guide me..

 

Advance Thanks...

Labels (1)
14 REPLIES 14
Message 2 of 15
Casey.P
in reply to: gparamasivam

Casey.P
Advocate
Advocate

Hi @gparamasivam ,

 

So far, the best way I figured is if you hold control and left click select the constraints that you want to delete. Once you have them all selected, just hit the delete button....

 

You could window drag and then deselect all of the features and constraints that you don't want to delete, but I think this section option will take longer.

0 Likes

Hi @gparamasivam ,

 

So far, the best way I figured is if you hold control and left click select the constraints that you want to delete. Once you have them all selected, just hit the delete button....

 

You could window drag and then deselect all of the features and constraints that you don't want to delete, but I think this section option will take longer.

Message 3 of 15
JDMather
in reply to: gparamasivam

JDMather
Consultant
Consultant

Rotate.

Rotate.png


-----------------------------------------------------------------------------------------
Autodesk Inventor 2019 Certified Professional
Autodesk AutoCAD 2013 Certified Professional
Certified SolidWorks Professional


Rotate.

Rotate.png


-----------------------------------------------------------------------------------------
Autodesk Inventor 2019 Certified Professional
Autodesk AutoCAD 2013 Certified Professional
Certified SolidWorks Professional


Message 4 of 15
imajar
in reply to: gparamasivam

imajar
Advisor
Advisor

I think @JDMather  solution is the best to solve your specific problem, but you can also select all the geometry, right click and select delete all constraints.  The drawback, is it will also wipe out the other constraints (except coincident).

 

Capture.JPG


Aaron Jarrett, PE
Inventor 2019 | i7-6700K 64GB NVidia M4000
LinkedIn

Life is Good.
0 Likes

I think @JDMather  solution is the best to solve your specific problem, but you can also select all the geometry, right click and select delete all constraints.  The drawback, is it will also wipe out the other constraints (except coincident).

 

Capture.JPG


Aaron Jarrett, PE
Inventor 2019 | i7-6700K 64GB NVidia M4000
LinkedIn

Life is Good.
Message 5 of 15
JDMather
in reply to: gparamasivam

JDMather
Consultant
Consultant

Can you Attach your file here?

I can't help but wonder why you would want to do this.

In 15 years of using Inventor - I have never seen this need posted here before.

 

Turning the sketch into a Sketch Block, might be another option...


-----------------------------------------------------------------------------------------
Autodesk Inventor 2019 Certified Professional
Autodesk AutoCAD 2013 Certified Professional
Certified SolidWorks Professional


0 Likes

Can you Attach your file here?

I can't help but wonder why you would want to do this.

In 15 years of using Inventor - I have never seen this need posted here before.

 

Turning the sketch into a Sketch Block, might be another option...


-----------------------------------------------------------------------------------------
Autodesk Inventor 2019 Certified Professional
Autodesk AutoCAD 2013 Certified Professional
Certified SolidWorks Professional


Message 6 of 15
gparamasivam
in reply to: imajar

gparamasivam
Enthusiast
Enthusiast

It will delete the all parallel and perpendicular constraints also,

I need only delete the horizontal and vertical constraints  

0 Likes

It will delete the all parallel and perpendicular constraints also,

I need only delete the horizontal and vertical constraints  

Message 7 of 15
gparamasivam
in reply to: JDMather

gparamasivam
Enthusiast
Enthusiast

In iFeature sketches should not have the horizontal and vertical constraints because it may cause make some issue on iFeature. So we have a to do not use horizontal and vertical constraints in iFeature sketches.

Hope you will understand our issue.

0 Likes

In iFeature sketches should not have the horizontal and vertical constraints because it may cause make some issue on iFeature. So we have a to do not use horizontal and vertical constraints in iFeature sketches.

Hope you will understand our issue.

Message 8 of 15
JDMather
in reply to: gparamasivam

JDMather
Consultant
Consultant

@gparamasivam wrote:

So we have a to do not use horizontal and vertical constraints in iFeature sketches.

Hope you will understand our issue.


Ah, now I understand.  And I was incorrect in my previous statement. 😮


-----------------------------------------------------------------------------------------
Autodesk Inventor 2019 Certified Professional
Autodesk AutoCAD 2013 Certified Professional
Certified SolidWorks Professional



@gparamasivam wrote:

So we have a to do not use horizontal and vertical constraints in iFeature sketches.

Hope you will understand our issue.


Ah, now I understand.  And I was incorrect in my previous statement. 😮


-----------------------------------------------------------------------------------------
Autodesk Inventor 2019 Certified Professional
Autodesk AutoCAD 2013 Certified Professional
Certified SolidWorks Professional


Message 9 of 15
gparamasivam
in reply to: JDMather

gparamasivam
Enthusiast
Enthusiast

No problem, thank you for your suggestion 

0 Likes

No problem, thank you for your suggestion 

Message 10 of 15
CGBenner
in reply to: gparamasivam

CGBenner
Community Manager
Community Manager

@gparamasivam  Did the information provided by answer your question? If so, would you please use Accept Solution so that others may find this in the future? Thank you very much!


Chris Benner
Industry Community Manager – Design & Manufacturing


If a response answers your question, please use  ACCEPT SOLUTION  to assist other users later.


Also be generous with Likes!  Thank you and enjoy!


Become an Autodesk Fusion Insider
Inventor/Beta Feedback Project

@gparamasivam  Did the information provided by answer your question? If so, would you please use Accept Solution so that others may find this in the future? Thank you very much!


Chris Benner
Industry Community Manager – Design & Manufacturing


If a response answers your question, please use  ACCEPT SOLUTION  to assist other users later.


Also be generous with Likes!  Thank you and enjoy!


Become an Autodesk Fusion Insider
Inventor/Beta Feedback Project
Message 11 of 15
gparamasivam
in reply to: CGBenner

gparamasivam
Enthusiast
Enthusiast

No, still I did not get the right answer

0 Likes

No, still I did not get the right answer

Message 12 of 15
CGBenner
in reply to: gparamasivam

CGBenner
Community Manager
Community Manager

@gparamasivam 

 

Aside from the suggestions you have received here, I think you might be looking at the need to create an iLogic solution to do this automatically.  I'm not certain that it is even possible with iLogic, but you could try posting in the Inventor Customization forum, maybe one of the experts there will have a suggestion.


Chris Benner
Industry Community Manager – Design & Manufacturing


If a response answers your question, please use  ACCEPT SOLUTION  to assist other users later.


Also be generous with Likes!  Thank you and enjoy!


Become an Autodesk Fusion Insider
Inventor/Beta Feedback Project
0 Likes

@gparamasivam 

 

Aside from the suggestions you have received here, I think you might be looking at the need to create an iLogic solution to do this automatically.  I'm not certain that it is even possible with iLogic, but you could try posting in the Inventor Customization forum, maybe one of the experts there will have a suggestion.


Chris Benner
Industry Community Manager – Design & Manufacturing


If a response answers your question, please use  ACCEPT SOLUTION  to assist other users later.


Also be generous with Likes!  Thank you and enjoy!


Become an Autodesk Fusion Insider
Inventor/Beta Feedback Project
Message 13 of 15
gparamasivam
in reply to: CGBenner

gparamasivam
Enthusiast
Enthusiast

Thank you for your suggestion 

0 Likes

Thank you for your suggestion 

Message 14 of 15
mcgyvr
in reply to: gparamasivam

mcgyvr
Consultant
Consultant
Accepted solution

@gparamasivam 

Here you go this will delete all horizontal and vertical constraints in a part in all sketches..

Dim oPartDoc As PartDocument
Dim oSketch As PlanarSketch

Dim geoconstraint As GeometricConstraint

On Error Resume Next

oPartDoc = ThisApplication.ActiveDocument

For Each oSketch In oPartDoc.ComponentDefinition.Sketches
For Each geoconstraint In oSketch.GeometricConstraints
	If geoconstraint.Type = kHorizontalConstraintObject Then
		'MsgBox ("Deleting Horizontal Constraints")
Call geoconstraint.Delete
Else If geoconstraint.Type = kVerticalConstraintObject Then
			'MsgBox ("Deleting Vertical Constraints")
Call geoconstraint.Delete
End If
Next geoconstraint

Next oSketch

MsgBox ("All Horizontal and Vertical constraints deleted!")


-------------------------------------------------------------------------------------------
Inventor 2023 - Dell Precision 5570

Did you find this reply helpful ? If so please use the Accept Solution button below.
Maybe buy me a beer through Venmo @mcgyvr1269

@gparamasivam 

Here you go this will delete all horizontal and vertical constraints in a part in all sketches..

Dim oPartDoc As PartDocument
Dim oSketch As PlanarSketch

Dim geoconstraint As GeometricConstraint

On Error Resume Next

oPartDoc = ThisApplication.ActiveDocument

For Each oSketch In oPartDoc.ComponentDefinition.Sketches
For Each geoconstraint In oSketch.GeometricConstraints
	If geoconstraint.Type = kHorizontalConstraintObject Then
		'MsgBox ("Deleting Horizontal Constraints")
Call geoconstraint.Delete
Else If geoconstraint.Type = kVerticalConstraintObject Then
			'MsgBox ("Deleting Vertical Constraints")
Call geoconstraint.Delete
End If
Next geoconstraint

Next oSketch

MsgBox ("All Horizontal and Vertical constraints deleted!")


-------------------------------------------------------------------------------------------
Inventor 2023 - Dell Precision 5570

Did you find this reply helpful ? If so please use the Accept Solution button below.
Maybe buy me a beer through Venmo @mcgyvr1269
Message 15 of 15
gparamasivam
in reply to: mcgyvr

gparamasivam
Enthusiast
Enthusiast

Thank you, 

It is working and very useful to us.

0 Likes

Thank you, 

It is working and very useful to us.

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

Post to forums  

Autodesk Design & Make Report