AutoCAD Inventor :: Using VBA To Constrain A Sketch
Jun 26, 2012
I've managed to hack together some code to draw a rectangle and dimension it. Now I want to constrain it to the origin. I figure either using two dimensions from a top/side to the origin and setting the dimension as half of the other respective dimension would work. Or constraining the center point of a top/side line to be vertical/horizontal to the origin.
The problem I'm having is I do not know how to reference the origin. So until I figure out how to reference the origin point I can't use either method.
Public Sub DrawSketchLine() ' Check to make sure a sketch is open. If Not TypeOf ThisApplication.ActiveEditObject Is PlanarSketch Then MsgBox "A sketch must be active." Exit Sub End If ' Set a reference to the active sketch. Dim oSketch As PlanarSketch Set oSketch = ThisApplication.ActiveEditObject ' Set a reference to the transient geometry collection. Dim oTransGeom As TransientGeometry Set oTransGeom = ThisApplication.TransientGeometry Dim oUOM As UnitsOfMeasure Set oUOM =
[Code].......
View 2 Replies
ADVERTISEMENT
Sep 5, 2013
How to become able to fully constrain a sketch with an image in it? Always stalls at 1 dimension required. Try a sketch with only an imported image.
View 2 Replies
View Related
Dec 1, 2011
How is this accomplished in Inventor? The 3D sketch environment seems intentionally crippled. Many of the constrains are not available, and the "include geometery" command refuses to include the origin (or any other planes and axis for that matter).
View 4 Replies
View Related
Apr 5, 2013
Is it possible to constrain sketch entities, (like lines), to a plane, (make the line and plane coincident)?
View 2 Replies
View Related
Oct 22, 2012
I have a sketch that Inventor changes its status between under constrained, over constrained, and fully constrained depending on dimensions (makes sense), and wether I rebuild the model (WTF?).
Steps to reproduce:
1) Open the attached .ipt file.
2) Examine Sketch11 (under Face3) It should be fully constrained.
3) Exit the sketch. Open the parameters dialog and change the value of "angle" from 45 to 60. (If you get an error message change it to 50 first, then 60. It's a work in progress.)
4) Re-examine Sketch11. It is now under constrained.
5) Exit the skecth and go to the manage tab. Click "Rebuild All".
6) Re-examine Sketch11. It is now fully constrained.
7) Scratch your head and post back with your theory.
View 7 Replies
View Related
Sep 14, 2012
I made a bunch of lines, then used the bend command to make curves where they intersected. I'm trying to put lines connecting A to C and B to D. How do I constrain the ends of the lines to the center of the curves?
View 9 Replies
View Related
Jan 10, 2012
When I add a text to a sketch, I can constrain the rectangle to set its size, orientation and position.And I can set the text width to fit into the rectangle. But I wasn't able to set the text height to fit into the rectangle.
Am I missing something or is the fit text option doing only half the job?
View 1 Replies
View Related
Aug 8, 2013
Do you know how to constrain 2d cad sketch to match existing 3D model. see screenshot. Is it doable?
View 6 Replies
View Related
Aug 28, 2013
When you're working on a sketch in the part environment the status bar shows the number of constraints needed to fully constrain the sketch. For example "2 Dimensions Needed".
How do you retrieve this value using Visual Basic Net?
View 5 Replies
View Related
Oct 4, 2012
I cannot select origin to constrain sketch with dimension to origin?
I selected Sketch,
expanded origin,
selected mywork plan (xy)
drew rectangle,
input dims,
right click for marking menu,
selected dimensions,
Origin is yellow,
cannot select it and then edge of rect to set dim that will center sketch on origin? Just like the videos show, but cannot select origin>
View 6 Replies
View Related
Sep 21, 2011
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
View 2 Replies
View Related
Sep 20, 2012
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.
View 4 Replies
View Related
Dec 3, 2013
I was trying to query some sketch points data from a profile Path using code as below. However the program stopped without telling the reason.
Code below:
i = 0;
foreach (ProfileEntity oSourceProfileEntity in oProfilePath) { switch (oProfilePath[i].SketchEntity.Type) { case ObjectTypeEnum.kSketchArcObject: { SketchArc srcSkArc = default(SketchArc); srcSkArc = (SketchArc) oSourceProfileEntity.SketchEntity; // error points[i] = srcSkArc.StartSketchPoint.Geometry; break; } default: { SketchLine srcSkLine = default(SketchLine); srcSkLine =(SketchLine) oProfilePath[i].SketchEntity; // error points[i] = srcSkLine.StartSketchPoint.Geometry; break; } } i++; }
View 2 Replies
View Related
Aug 1, 2011
First we imported an ".igs" file to inventor, which produced "wires". Then by promoting the wires it produced a 3-d sketch.
The model is in one plane and 2-D, and we are trying to use Ansys 2-D analysis, but in-order to do so it needs to be in a 2-D sketch.
The model is too large to be redrawn on a 2-D plane, how to convert it to a 2-D sketch
View 9 Replies
View Related
Dec 14, 2012
want to change sketch 2013 into the sketch of 2010
View 1 Replies
View Related
May 30, 2013
When I edit certain sketched some other sketches disappear. see attached.
This is causing modelling to slow down as I can not project lines from the sketch that has disappeared.
View 8 Replies
View Related
Aug 22, 2012
After I create a adaptive part from projected sketch. How to modify the sketch? Please see the part attached.
View 6 Replies
View Related
Mar 4, 2012
what is the difference between a sketch and a planar sketch?
View 2 Replies
View Related
Aug 16, 2012
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?
View 2 Replies
View Related
Oct 28, 2011
I've made 2 parts and I'm attempting to constrain them but I can't seem to get it to fit properly.The transition should fit at the opposite end of the 2 square cutouts with the square end of the transition inside the cylinder.
View 7 Replies
View Related
Feb 28, 2013
I am trying to CAD a model rocket I just made so I can test the aerodynamics of it. I have all of the individual parts made in inventor, but I am having trouble getting the fins on the rocket.
How can I constrain the fins (which have a flat face) to the outside of the cylindrical rocket tube? The photo shows the fin and the face (the narrow and long face) that I am trying to constrain to the tube.
View 7 Replies
View Related
Oct 19, 2012
SO what is everyone say, trick about speeding up constrain execution. I have started working on this new project with 2013. And i'm finding myself losing alot of time. Basicly what i do is insert part from our database or content center and assemble them. So 80% of my activities on inventor are constraints. Right now i have this assemblies 175 / 156(small to me). And executing a constraint is minimum 4 seconds each time. If you consider that about 3 contraint is needed for each piece and final total part will probably be around 1000. i'm losing alot of time here
Yeah, i am not using preview. Why is inventor recalculating that much each time? Is it doing a rebuilt after each constraint?
What have you done that really increase the excution time of constraints?
Workstaion is
Windows 7 64bit
Intel Extreme i7cpu I975 @ 3,33
12bg ram
4 ssd in Raid stripping.Nvidia FX3800
Inventor 2013 SP1
View 9 Replies
View Related
Dec 31, 2012
I am trying to determine how to properley constrain the assembly below, so that the compression of the rubber gasket will be properly indicated.
Currently I am seeing the deflection of the shelf in the downward direction, but I do not see any indication of stress in the gasket behind.Currently the gasket is "bonded" to the steel tube the screws are bonded to the shelf bracket and the steel tube.
I put in "work axis" at the center line of the shelf bracket and the CL of the gasket, but I can't find a way to constrain to a work axis.The file is too large to upload here...
View 1 Replies
View Related
Jan 9, 2013
I have one problem and I would like to get your opinion how I could solve this.
I can't share models I have problem with, but I made another with the same problem.
I have two parts - one with slot, another with "pin". How to constrain the "pin" to always move in slot?
I had some ideas but non of them worked for me:
1. Use the Transitional constrain came first in mind, but it gives unsuspected results in this situation. Pin part is jumping around and ends up contrained in another place ir should be.
2. Contact solver kind of do the job, but it works quite bad. I gives no control or accuracy (i can not control how much pin is moved out)
3. I even thought of point on 3d sketch constrain, but it can not be done
How you would suggest to constrain the movement? I hope I stated problem clear enough.
I attached model files. I use Inventor 2013
View 4 Replies
View Related
Nov 25, 2012
I'm trying to make a constraint allowing the dark smaller cylinder (1) to run in the copper track (2). I want the larger cylinder (3) to be able to rotate around its own axis, while everything is rotating around the Z axis. I've successfully constrained the parts so that all the parts can rotate around the Z-axis but when I constrain the smaller cylinder (1) with the tangent constraint with the track (2) the smaller cylinder is not able to move around on the face, it's just glued to the face.
I want the smaller cylinder (1) to recognize the copper faces as solids (so that it can't intersect the surfaces), this would allow the proper movement. I've attached an image of the parts.
View 1 Replies
View Related
Jan 10, 2012
What is the difference between Constrain and Assemble?
They both seem to create the same mating constraints, but Assemble doesn't work with adaptive parts.
Any other difference (other than the interface)?
View 1 Replies
View Related
Aug 4, 2013
Is it possible to have a tangent constrain on multiple curves?
see enclosed rough sketch, i would like the curved free end or the arm to be in constant contaced with the wavey top line on the other part, the wavey line is constructed as 3 curves but i can only get the tangent constrain to apply to one of the curves.
i would like the tangent constraignt to move between the curves so the part stays in constant contact with the wavey line. this is just a mess about sketch i suppose a real world instance will be a wheel following a shaped cam plate.
View 2 Replies
View Related
Nov 23, 2012
I have an assembly with a curved line made in a sketch, and a part with a point in the bottom.
I want to constrain the point to the curved line, but the regular Constrain options wont let me do so.
I am making an animation with Inventor Studio, so I need this constrain, so I later on in studio can manipulate it and insert the first part into the other.
View 2 Replies
View Related
Jun 14, 2012
In Auto desk inventor how to check assy was fully constrain and whick comand to use to check ?
View 4 Replies
View Related
Jan 13, 2012
How you constrain a section view so that is perpendicular to an axis. See "SECTION B" on the attached drawing for an example of what I am attempting. I have created the view but cannot make (constrain) the view perpendicular to the slot that is orientated at 30 degrees from the vertical centre line. I have lined up the view by eye so it looks close but it's obviously it's not accurate.
Product Design Suite
Inventor Premium 2012 - SP1 Installed
HP 8760w I7-740M Laptop
Windows 7 Professional 64
12 Gb DDR SDRAM
AMD FirePro M5950 Graphics Card
View 1 Replies
View Related
Nov 22, 2011
After installing the cloud-optimization-upgrade for subscription customers I cant export video from "drive constraint".I click the "record" button, I choose the name and quality of the video and when i then return to the "drive constraint dialog box" I get an error message "The file constraint.wmv could not be opened".
I have tried different names, storage locations and different video-quality but nothing changes.I successfully performed the same video creation just before the upgrade with the same assembly file so I know that its not the file.
View 2 Replies
View Related