AutoCAD Inventor :: Hiding Sketch Or Changing Lineweight?
Dec 26, 2012
(Image attached). I am using Inventor 2013 and Visual Basic 2010 Express. I created a sketch within one of my views on my .idw. I would like to turn this sketch on or off based on the input from a variable that is read elsewhere. I have used the following code from the help file with no luck so far.
Public Sub SketchEdit() Dim oDrawDoc As DrawingDocument oDrawDoc = _invApp.ActiveDocument ' Determine if there are any sheet overlay sketches. Dim oSketches As DrawingSketches oSketches = oDrawDoc.ActiveSheet.Sketches If oSketches.Count = 0 Then Exit Sub End If ' Set a reference to the first sketch. Dim oSketch As DrawingSketch oSketch = oSketches.Item(4) oSketch.Edit() If vValue_Closer = "" Then oSketch.LineWeight = 0 Else oSketch.LineWeight = 0.007 End If ' Return from edit mode. oSketch.ExitEdit() End Sub
The code errors out on the line 'osketch = osketches.item(4)'. I have tried using a number like that, and I have also tried using the actual name of the sketch. Neither works.
oSketch = oSketches.Item("Closer_Reinf")
what to edit here to get it to look at my Closer_Reinf sketch to hide it/unhide it ?
The attached files are two sprockets. The original part has 30 teeth. I need 34 teeth.
The MODIFIED part has one of my attempts at making 34 teeth. I have tried the following with the same error dialog box (see below):
1. Edit Sketch_6 (associated with Extrusion1) by deleting all but one of the teeth lines (2 arcs and 2 lines that make up a tooth) and making a circular pattern of 34.
2. Same circular pattern, except this time I "Close the Loop" (right-click on one of the teeth line segments > Close Loop > click on all the segments until the loop is closed).
3. Same circular pattern, except this time change the resulting patterned lines into construction lines, trace these lines with arcs and lines of my own (not construction lines), and close the loop on my own lines.
When each of the 3 attempts failed, I tried deleting Extrusion1 and making a new Extrusion feature from Sketch_6. I cannot select what I want in Sketch_6 in order to make the teeth.
I'm at the point where I'm just going to take the dimensions from the circular pattern sketch of 34 teeth, delete Extrusion1 and Sketch_6, and make my own sketch and extrusion.
For the future, I really would like to know - why is it so difficult to alter features like this? Yes, I understand that Sketch_6 is not fully constrained, and on top of this I am not privy to how it was generated in the first place (this is a part file from a vendor). But it does not strike me as something overly complicated for the Extrusion feature to recognize a change in its associated sketch. This is not the first time I have encountered something like this.
I am having trouble changing the dimension text size of any 2d or 3d sketch..
the default has changed for some reason (i might have accidentally changed it while looking for something the other day) but i need to know how to change it back.. I can't do anything without a dimension getting in the way!
I've created a shared sketch and have used it with various features. Sometime those features are suppressed. The model works fine but the shared sketch generates a sketch doctor error because the feature that created it has been suppressed. Is there anyway to make the sketch suppressed so it doesn't trigger a sketch doctor error? Inventor 2013
How do I duplicate the 2D line work from a part level sketch into a drawing level (overlay) sketch?
I started a simple 2D piping system diagram sketch by opening a new part file and using a sketch to stick draw the system schematic including some annotations. Then I opened a new drawing file and made a base view of the part file to bring a view of the original sketch into the drawing.
I realize now that it would have been much easier to have created the schematic directly in a 2D sketch at the drawing level, which would have made editing the annotations much easier at the drawing level, and there is really no need for the part file to exist. I have no intention of creating a 3D model or "real" part in the .ipt file, was just using it as a jumping off point to sketch.
I was thinking that I could correct my error in judgment by just copying the sketch and pasting it into a new sketch on the drawing, but it doesn't want to work that way. I have tried copying both the whole sketch at the browser level, and the entire sketch contents (all of the lines and annotations) from the opened part sketch, but when I attempt to paste either of those into the drawing, paste does not seem to be an option. I'd rather not have to draw the whole thing again, as in typical fashion, my once simple sketch has grown in proportion and complexity from its simple beginning.
I'm having trouble with constaints, I'd like to constrain my sketch to a point in another sketch on a different plane. Is this posible in Inventor? If so how? If Inventor works differently how would you get a points in one sketch to be linked to points another?
I have created a part with multi bodies (concrete block with reo bar), in the drawing I want a view that shows just the reo bar - concrete hidden. Can this be done?
I am making a multiview drawing with isometric of a certain sheet metal part. Due to manufacturing reasons, they have to make the part longer than necessary to get a bend in it then I will have them shear off the extra. Is there a way I can show the multiview and flat pattern WITH the extra material and show the isometric WITHOUT that extra? In the model I remove the excess with a cut but I don't know how to suppress a feature for one view and not another.
I am trying to hide an extruded cut in one view of my .idw. I have tried supressing in one view but this does not work. I need to show a before and after of this cut in the same model. I can not make two models because this is a controlled document.
I am working on detailing an assembly that requires two parts to be bolted together and then have a hole bored through both parts. I want to show the assembly without the bore and then with the bore. I do not want to have to create a derived part. There should be a way of toggling this extrusion in the assembly view, but I have not yet found it.
I want to hide some drawingcurve in my assembly drawingview,but can't make it.
My code is as follows:
Public Sub HideDrawingcurves() Dim oDoc As DrawingDocument Set oDoc = ThisApplication.ActiveDocument Dim oSheet As Sheet Set oSheet = oDoc.ActiveSheet Dim oDrawingCurve As DrawingCurve Set oDrawingCurve = oDoc.SelectSet.Item(1).Parent oDrawingCurve.Visible = False End Sub
I'm reminded that there is no such method as the bolded .How to hide or delete drawingcurves
I'm writing code to split long part list in new sheets. Infact it's finished but very slow. Because each time I hide the line part list start to refresh itself...
I tryed to use
oDoc.DrawingSettings.DeferUpdates = True
But in this case I can only see empty part list on each page?!...
I just want to speed up process and I want to refresh part list view after than hiding process finished completely...
I am trying to embolden lineweights to stand out on the drawing, without them getting in the way when viewing in the drawing. I have set the lineweight in the layer dialogue box to the max size (2.xx mm), checked the "plot lineweights" in the printer dialogue and switched between none and grayscale (this is so the assigned colors will fade out in the background). Nothing I have tried thus far has changed the print output on any of my printers (virtual PDF, HP2100, HP2600n, HP2840 they are all very old). I have read through the lweight command and help sections, but I don't need it assigning the lw just getting it to properly print.
One possible problem: is the line weight relative to scale or is it absolute? I am printing at 1/8" scale, and that can't change.
Quick question about plotting to a PDF. I'm using autocad 2013 and I'm plotting to a PDF printer called bullzip, a free PDF printer. My question is, will my line-weights be the same if I have kinko's print a PDF file with my drawings in them
I need to print an initial 2d sketch (without any 3d work done on it).
Printing this in sketch mode seems to output a screen capture, i.e. some lines appear wriggly and not as precise as an ordinary plot of an idw or dwg file.
A sketch w/o any 3d work will not be accepted as an idw file, thus I am not able to use all the formatting (tblocks, fonts, dimstyles, etc.) options available to idw files.
Is there a way of printing a 2d sketch (w/o any 3d work) as an idw file?