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: 

Inventor sketch block will not delete

24 REPLIES 24
SOLVED
Reply
Message 1 of 25
william
3481 Views, 24 Replies

Inventor sketch block will not delete

william
Advocate
Advocate

Hello 

I have a part file that keeps giving errors on new features, basic extrudes, etc. After digging into it, it appears to be a single sketch block & associated parameters that are the problem. 

 

I have tried every way i can think of to delete the parameters and the sketch block, it it refuses to be deleted. 

 

I have stripped the part right back to only containing the sketch block, no other parameters, sketches, or features and it still will not delete. 

 

I really dont want to create a new part and spend 3-4hrs rebuilding the part from scratch because of 1 sketch block. 

 

Can anyone figure this out? 

0 Likes

Inventor sketch block will not delete

Hello 

I have a part file that keeps giving errors on new features, basic extrudes, etc. After digging into it, it appears to be a single sketch block & associated parameters that are the problem. 

 

I have tried every way i can think of to delete the parameters and the sketch block, it it refuses to be deleted. 

 

I have stripped the part right back to only containing the sketch block, no other parameters, sketches, or features and it still will not delete. 

 

I really dont want to create a new part and spend 3-4hrs rebuilding the part from scratch because of 1 sketch block. 

 

Can anyone figure this out? 

Labels (3)
24 REPLIES 24
Message 21 of 25
kimK7B54
in reply to: kimK7B54

kimK7B54
Advocate
Advocate

@kimK7B54 wrote:  (reply to add missing images)
That does not work.

This is the only dimension it brings in, and it is not a needed dimension.

I need to be able to "auto-populate" some these variables.  This would
change a 2 hour job into a 5 minute job.

Currently I have to manually find these ( in a list of up to 50
iFeatures, locate the correct one, and insert the value )

I have to go to the model to identify which iFeature I am detailing,
then back to the idw;  Very, very time consuming.


import model parameters.pngparameters needed.png

0 Likes


@kimK7B54 wrote:  (reply to add missing images)
That does not work.

This is the only dimension it brings in, and it is not a needed dimension.

I need to be able to "auto-populate" some these variables.  This would
change a 2 hour job into a 5 minute job.

Currently I have to manually find these ( in a list of up to 50
iFeatures, locate the correct one, and insert the value )

I have to go to the model to identify which iFeature I am detailing,
then back to the idw;  Very, very time consuming.


import model parameters.pngparameters needed.png

Message 22 of 25
johnsonshiue
in reply to: kimK7B54

johnsonshiue
Community Manager
Community Manager

Hi! It seems like a bug or a limitation in the iFeature. I suggest you start a new thread with the iFeature ide file and the source ipt file extracting the iFeature. I would like to understand why the iFeature parameters are not being retrieved in the drawing.

Many thanks!

 



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer
0 Likes

Hi! It seems like a bug or a limitation in the iFeature. I suggest you start a new thread with the iFeature ide file and the source ipt file extracting the iFeature. I would like to understand why the iFeature parameters are not being retrieved in the drawing.

Many thanks!

 



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer
Message 23 of 25

aperrone_lc
Explorer
Explorer

I didn't have much luck with @bradeneuropeArthur 's solution, but I figured out why. My offending "phantom sketch" wasn't at index 1. I used the following modification of Arthur's code to figure out the index I needed to kill:

 

Dim a As PartDocument = ThisDoc.Document

MsgBox(a.ComponentDefinition.Sketches.Count)

For i = 1 To a.ComponentDefinition.Sketches.Count:
	MsgBox(a.ComponentDefinition.Sketches.Item(i).Name)
Next

a.ComponentDefinition.Sketches.Item(2).Delete

 

Note that I ran this once, then modified line 9 to delete the correct index. There doesn't seem to be any harm in getting the index wrong on the first run-through; it'll just throw an error. Also, this will get annoying on a large model. Mine only had 3 or 4 sketches, so it was quick to run through the repeating message boxes. There is surely a more elegant solution to be had.

0 Likes

I didn't have much luck with @bradeneuropeArthur 's solution, but I figured out why. My offending "phantom sketch" wasn't at index 1. I used the following modification of Arthur's code to figure out the index I needed to kill:

 

Dim a As PartDocument = ThisDoc.Document

MsgBox(a.ComponentDefinition.Sketches.Count)

For i = 1 To a.ComponentDefinition.Sketches.Count:
	MsgBox(a.ComponentDefinition.Sketches.Item(i).Name)
Next

a.ComponentDefinition.Sketches.Item(2).Delete

 

Note that I ran this once, then modified line 9 to delete the correct index. There doesn't seem to be any harm in getting the index wrong on the first run-through; it'll just throw an error. Also, this will get annoying on a large model. Mine only had 3 or 4 sketches, so it was quick to run through the repeating message boxes. There is surely a more elegant solution to be had.

Message 24 of 25
RobNZIFSL
in reply to: aperrone_lc

RobNZIFSL
Contributor
Contributor

I have a master part containing around thirty blocks, perhaps half of those nested.  Copying out the required blocks (all but the two I want to delete) is not a viable solution due to derived components dependency on the master part.

 

I want to delete the two blocks shown below.  You can see one is nested into the other.  I have edited the 'parent' to window select all content and then deleted that content; this has not removed the 'child' block.  I have also run the above code without improvement.

 

RobNZIFSL_0-1717967969601.png

 

I believe it could be resolved by removing the implied parent child reference but don't know how to do this.  Any thoughts?

0 Likes

I have a master part containing around thirty blocks, perhaps half of those nested.  Copying out the required blocks (all but the two I want to delete) is not a viable solution due to derived components dependency on the master part.

 

I want to delete the two blocks shown below.  You can see one is nested into the other.  I have edited the 'parent' to window select all content and then deleted that content; this has not removed the 'child' block.  I have also run the above code without improvement.

 

RobNZIFSL_0-1717967969601.png

 

I believe it could be resolved by removing the implied parent child reference but don't know how to do this.  Any thoughts?

Message 25 of 25
johnsonshiue
in reply to: RobNZIFSL

johnsonshiue
Community Manager
Community Manager

Hi Rob,

 

This could be a corruption. Somehow the sketch block is still referenced by a ghosted sketch. Please share the file here or send it to me directly johnson.shiue@autodesk.com. I can take a look to see if it is indeed a corruption and it can be purged.

Many thanks!



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer
0 Likes

Hi Rob,

 

This could be a corruption. Somehow the sketch block is still referenced by a ghosted sketch. Please share the file here or send it to me directly johnson.shiue@autodesk.com. I can take a look to see if it is indeed a corruption and it can be purged.

Many thanks!



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer

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

Post to forums  

Autodesk Design & Make Report