AutoCAD Inventor :: Retrieve Dimensions In Drawing With ILogic
Oct 8, 2012
I want to retrieve dimensions in a drawing with ilogic. I found some code but how to translate it into a ilogic code.
I always use assembly models in these drawing and all the parameters have unique names. So in my drawing i want to retrieve some specific dimensions in a view.
I'm trying to put a little iLogic rule in my drawing template which triggers as soon as the drawing is opened. The rule asks the user whether the component he's making a drawing of needs to be painted or not. If it gets painted, the paint area (one side only or both sides) needs to be calculated. The result of this is then referenced by a text note in the title block.
I can do the radio boxes with the questions, as well as their If loops, but only when I'm in the model. Due to our, admittedly inefficient workflow, we never have time to specify "minor details" like paint area or spec during modelling, only when we get to drawing level. I'd like to put the iLogic rule inside the drawing template. I'm having trouble referencing the iProperties of the model from within the drawing's iLogic interface.
What I have so far is this rule, which I can run inside the model:
'set dummy variable equal to total areatotal_area = iProperties.Area'start radio box with questionsText1 = InputRadioBox("Will this component be painted?", "Yes", "No", Text1, Title := iProperties.Value("Project", "Description"))If Text1 = True ThenText2 = InputRadioBox("How many sides will be painted?", "Both sides", "One side only", Text2, Title := iProperties.Value("Project", "Description"))If Text2 = True TheniProperties.Value("Custom", "Paint Area") = total_areaElseIf Text2 = False TheniProperties.Value("Custom", "Paint Area") = total_area/2End IfElseIf Text1 = False TheniProperties.Value("Custom", "Paint Area") = 0End If
adding a line or two so that I can run the same rule, but from the drawing.
I have a automated ilogic model that is then used within a 2D drawing, this 2D drawing then has dimensions on it referenced to the the model.
This model changes in its length the dimension associated with its length then changes but the dimension text then goes outside of the dimension boundary (does not stay central). Is there any code that can scan the dimensions and in effect tidy them up?
In Inventor 2010 is it possible to retrieve the dimensions from the weld in an idw without rewriting this dimensions?Now when hitting weldings in idw the symbol stays empty.
I am trying to retrieve dimensions from an assembly. The features that I want were created in the assembly itself, not on the original parts in the assembly. I can manually dimension some of the features, but there are others that I need to retrieve. When I retrieve dimensions from the assembly, I am only given the original dimensions for the parts.
I am using Inventor 2012. I have a subassembly that has two parts. I was able to dimension each part by retrieving dimensions. This subassembly also is an iAssembly. The main part stays the same but the second part changes.
My problem is, I had to make the main part an iPart because in one of the subassemblies, the main part has an added feature. After making the main part an iPart, all my dimensions in the subassembly drawing turned pink. I removed the dimensions and tried to retrieve them again but now I cannot. There are many dimensions I cannot manually dimension.
Is there away to retrieve dimensions from an iPart in a subassembly?
Some months ago I created an iLogic code that creates all my notes that I use in my drawings, linked to a form. A good tool the made my work a little easy. Now I wanna make an update on it.
In my code I create a sketchedSymbol and then some textBoxes with my notes, but before that I erase all the Symbols in all sheets and then the main Symbol itself. Then I create again the symbol and textBox in a specific point of my Sheet. So, everytime that I need to update my Notes, it goes to that point of the sheet, it's not a problem, but it's annoying have to move them always to the correct place. And i can't use a specific final point for the notes because it may change according to the drawing.
So, my idea is:
If the Symbol is already created, how can I get its position ?
I create the points with TransientGemometry and then CreatePoint2D, but I dont know how to retrieve these points, even if that is possible.
The code I use is that below (I just erase the notes because it was too big, this is just the main code creating the stuffs).
' Set a reference to the drawing document. ' This assumes a drawing document is active. Dim oDrawDoc As DrawingDocument oDrawDoc = ThisApplication.ActiveDocument'Update the document oDrawDoc.Update'apaga o symbol existente em cada sheet Dim oSheets
I am using Inventor 2011. I have recently just dimensioned my entire drawing using only the retrieve command, but now that the angles of my section views have changed the command is not working. In this example you can see section B will allow me to pull up dimensions (not sure why they are not aligned) but section A will not allow to me to pull anything.
iLogic rule that will retrieve a part number(s) from an excel sheet. I work for a company that built vacuum trucks and I'm trying to make an . I am template where the user can select different lengths of shells to achieve the desire overall length. I have been able to achieve this using iLogic rules and forms and making the shell length parameter multi value.
But now I need to show predetermined SAP part numbers for the shells in BOM or part list. I all ready have an excel sheet with shell sizes with corresponding part numbers on file. I also thought about incorporating our custom CC parts/shells that already have the SAP part numbers set up as a custom iProperty but might be to complicated for a newbie iLogic user.
I am currently trying to retrieve data from a MS Access Database, we currently have iProperties with number values in them. An outside programmer created a code which takes these values and exports them to an MS Access Database, where they are then translated to mean something.
Instead of exporting those numbers, I want to use them to find what they ACTUALLY mean within the database and bring that information back into iLogic. (ie. 123456 actually means "1/4 Flat Bar Steel")
In short, I wish to access the MS Access database through iLogic in order to read information from it.
I have searched for the better part of 3 hours but have not found a good answer or example code of this situation. I am not that experienced in programming, but have worked with the API before for developing Automated Drawings and have an understanding how to navigate through. If there were to be some example code, I can begin to understand the process quite well through this method as well by seeing how to go about coding this.
I was trying to reposition a retrieved dimension in drawing. I was able to position the text, however the dimension line however still stays in its default retrieved position. how I can reposition the dimension line as well?
Dim mydim As Inventor.ObjectCollection Dim invDimConstraints As DimensionConstraints Dim invDimConstraint As DimensionConstraint invDimConstraints = invPartDef.Sketches.Item("MySketch").DimensionConstraints
ilogic for converting dimensions imperial to metric form in sketch, part and assembly level
I have one task in this total models(parts and assemblies) having imperial dimensions but customer wants total dimensions in metric form with rounded value.
mean while all the dimensions directly convert to metric form dimensions are having many decimal places but customer wants ronded value like for example <1.5 is 2 and >1.5 is 1 like this. one more example is 2.56 is 3 and 2.46 is 2 like this.
I already have a code below that will read a bunch of drawing filenames that will go into each drawing, save the drawing, (print the drawing but I have this disabled for now,) close it, then move onto the next one.
What I want to do is add reference brackets around every dimension on each drawing. I have managed to update part list styles before using ilogic but I am not sure if it is possible with dimensions.
question = MessageBox.Show("Are you sure you want to update multiple drawings? If so, make sure all drawings are checked out.", "Batch Drawing Update",MessageBoxButtons.YesNo,MessageBoxIcon.Question)
'set condition based on answer If question = vbNo Exit Sub End If
I'm trying to reposition dimensions in a drawing through the API. The output of my code seems to indicate the method is working, but after it runs the drawing is unchanged. Here's the code (in VBA):
Dim oDoc As DrawingDocument Set oDoc = ThisApplication.ActiveDocument Dim oSheet As Sheet Set oSheet = oDoc.Sheets.Item(1) Dim oLdim As LinearGeneralDimension Dim oLeaderNote As LeaderNote Dim oDimLine As LineSegment2d ' Dimension Line Dim oStartPt As Point2d ' Dimension Line Start Point Dim oEndPt As Point2d ' Dimension Line End Point
[code]....
Looks like it moved my vertical dimension left, but it doesn't actually do anything. Is this not a viable method for repositioning a dimension?
I created a sketch then tried to retrieve dimensions in a drawing from the sketch. When I used the retrieve function, no dimensions appeared. I made sure that the box in the Application Options under the Tools tab was checked for retrieving all dimensions upon placement. I have tried numerous ways to retrieve the dimensions, and while I can place them manually, I really need to be able to retrieve all at once as seen on the sketch.
I have been able to use the retrieve function before on files that I downloaded from a website so I know to use the function.
I'm attaching a file which I am having trouble retrieving dimensions. I am using Inventor 2013 educational version.
I'd like to take a set of ordinate dimensions and multiply all the values by 10. Is this possible, without overriding the values and making them static?
The reason I'm asking is because I'm making a flat layout sketch for pockets around a drum. So imagine taking a drum and rolling it out flat. In the direction along the drum I drew it as 1" = 1" and for the circumfrence direction I did 1" = 10° so I don't have sketch that is 13" x 360". So I need to scale the dimensions in 1 direction up by 10.
I got a new computer recently and installed Inventor 11. I found I could not change the drawing dimensions (It chanced in the Edit Box and shown the changes in the dimensions, but after click "OK", the Edit Box closed and the dimension did not change).
I remember there were the similar problems before and I installed KB918118 fixed it. So I tried to install KB918118. But my computer shown a message saying my computer system is newer and do not need the KB918118 update.
I am wondering how best to apply drawing dimensions to a view. I am using VBA (Inventor 2010 x64) to modify a template skeletal assembly and save it. I have succeeded at generating the models, drawings, and drawing views, but have hit a wall when I attempt to automate the process of applying drawing dimensions.
I attempted to use GeneralDimensions.Retrieve with the DimensionsToRetrieve parameter, as I wish to retrieve only a few dimensions. My testing, however, indicated (and the helpfile confirmed) that the DimensionsToRetrieve parameter only work if the DimensionConstraint objects belong to a drawing sketch, and I'm retrieving dimensionconstraints from a model sketch. It appears to me that I will have to retrieve all dimensions and then somehow delete the unnecessary ones. This seems unusual to me--is there a better way? Can I, for example, retrieve a single dimensionconstraint at a time from the model rather than all of them at once? Perhaps its suitable applying drawing dimensions without retrieving them from the model?
I got a new computer recently and installed Inventor 11. I found I could not change the drawing dimensions (It chanced in the Edit Box and shown the changes in the dimensions, but after click "OK", the Edit Box closed and the dimension did not change). I remember there were the similar problems before and I installed KB918118 fixed it. So I tried to install KB918118. But my computer shown a message saying my computer system is newer and do not need the KB918118 update.
I use parametric base-model which automatically generates drawing (look "Pic1"). I change parameters I need and new drawing is generated (scale stays the same). However, dimensions on new drawing are displayed in random way (look "Pic2"). Is there a way (iLogic, VBA or smth els) to fix/link dimensins so - that they could stay in an appropriate way (space between dimensions, space between dimension and edge, dimension is centered on line with arrows) when the model size is changed (in this example I have changed the base diameter from 830 to 1280)?
Function "Arrange dimension" does not solve the problem!
I have an asssembly stack and I have a known bending moment at a given place (ie the datum). I want then to create a drawing of this stack up and show the bending moments at known locations beside the relative dimension.
Now I can do this manually no problem...but I would like this drawing to update automatically. ie the stack up height(s) change and i want the bending moment figure to update accordingly.l
Is there a way to do this with drawing dimensions? ie dimensions created in drawing mode?
One of the drafters I work with has been having an intermittent problem with Inventor 14 deleting dimensions and notes when he prints a .idw to a .pdf. The problem first popped up when we transitioned to 14 from 12. It only happens once out of every 2 dozen or so prints and is usually caught on the redlines, but it has been overlooked once already requiring the part to be remachined at cost to our employer. No one else in our office has had the problem and it continued to happen after a reinstall; which leads me to think it's some hardware issue.
Included is a screenshot of his system information. We're running Synergis Adept file management software, that may be pertinent as well.
I am trying to figure out how to properly define the dimensions of an exponential curve in a drawing to make it easiest to have the piece machined.
I am starting to wonder if inventor refers to this type of curve as something else entirely, as well. Since an exponential curve is like the shape of an airplane wing and doesn't have a "consistent" angle.
I know you can obviously set the tolerance in the styles to round to the nearest 1/16 or 1/32, but is there a way to make it always round a dimension up instead of to the nearest? IV2012
Windows XP SP3 32-bit Intel Core 2 Duo 6400 @ 2.13 GHz Nvidia Quadro FX 3450/4000 SDI 256MB Vram 2 GB Ram 160GB HDD