AutoCAD Inventor :: Add Occurrences To Selection (in Drawing Mode)
Oct 8, 2012
I'm dreaming of a Macro to automate the following process that we use every day. We use it to highlight connectors so people can build our product easier.
We manually do the following:
In a drawing view we select a whole set of components (the connectors). Afterwards we change the color to green (using properties) & press hidden lines. This way you can clearly see where you need to place the connectors.
-> see .pdf attached with some pictures making it all clear
I'm being busy to create the code for this but I'm stuck over adding occurrences to a selection set so I can then apply the hidden line command
This is my code so far:
Sub AutoColor()'Step 1 Select a drawing view ' Get the active drawing document. Dim drawDoc As DrawingDocument Set drawDoc = ThisApplication.ActiveDocument ' Have the user select a drawing view. Dim drawView As DrawingView Set drawView = ThisApplication.CommandManager.Pick(kDrawingViewFilter, "Select a drawing view.") Dim docDesc As DocumentDescriptor Set docDesc = drawView.ReferencedDocumentDescriptor ' Verify that the selected drawing view is of an assembly.
[code]....
Step 1 works
Step 3 works
Step 4 & 5 are for a later moment
Step 2 calls the sub "SelectOCC". this sub cycles true the occurrences, I can filter them on file location so I only get the components needed (the connectors). In theory it should be possible to add the given occurrences to the selection set so I can run Step 3 afterwards on it.
But I don't succeed in doing this, I've tried countless of methods but without success.
In Inventor Drawing Mode how to select the models in Browser tree using VBA, I think using selectset is not possible in my knowledge. Is there any other way to execute the selection .
I'm working on Autodesk VBA, and I'm trying to get user input on which vertex to use for a constrain. I want to make a macro that can go into part edit, allow user to select a vertex, and then automatically set up the constraint. Initially I wanted to do this in a single macro, using this short piece of code
while oSelectSet.Count <>1 DoEvents Wend
While this worked when run directly from VBA, if I call it as a macro in Autodesk itself, the DoEvents doesn't seem o work because I wasn't able to make any selection at all. I googled and it seems like this is just how macros are.
So I split the code into a 2 subs and a function (as attached), and put them into separates rules that I call using a form in Autodesk. The first sub "Meta1Pin1_1" works, then I would select a vertex in edit mode. But when I go ahead and call the second sub "Meta1Pin1_2", I get the error message that I created which says no vertex is selected. But if I select a vertex and call the second sub again, it will work.
So I've been trying different things and I realize that every time when I first call the second sub, my selection is erased teh moment it goes into the sub. But, for some unknown reason, the selection will remain when I call it the second time. I can't figure out what exactly happened between the first and second call of the same sub, that allowed the selection to remain.
' prepares assembly for user input by grounding bones and going into part edit Public Sub Meta1Pin1_1() Dim oDoc As AssemblyDocument
I have an Inventor drawing which contains multiple sheets. One of the sheets is a drawing of the master assembly. Another sheet is a drawing of a part that is in the master assembly. This part shows up multiple times. I'd like to have a text box or something in the part's drawing that I can put: "Quantity: [Quantity]" where [Quantity] is the number of occurances of the part in the master assembly. I've been searching for a while and can't find a way to do this.
My application, writing in C#, exports all vertex-data of parts in an assembly to external files.It uses the surfacebody.getExistingFacets method to do this and shows a progressbar to visualise progress.
The application works fine, only when it is finished, when I zoom in or zoom out in inventor, a huge delay exists before the actual zoom is done. And everytime I scroll the mouse wheel or touch my 3D mouse the delay is there.It's really up to several seconds everytime.
However when I close the assembly and re-open it again immediately after my app finished, these delays are not there anymore.Do I have recalculate something, or do I have to invoke a 'free-something' command ?
When creating a selection Command using the PromptXXXOptions and PromptXXXResult. The entities are selected on the current view, but once the selection ends the entities return to an unselected state.
Is it possible to leave them in selection mode.
I want to this, because it will be better to use Editor.SelectImplied() instead of saving the last selection object Ids.
Starting a drawing which now needs a revision. Can't for the life of me find a revision cloud tool to mark up a change. This is the feature in SW [URL].......
Somewhere along the lines I must have clicked something to lock my views in drawing mode once I place them because after placement I cannot click and drag them around anymore...
I am using inventor 2013. I am doing some standardization process to make design drawing.How can i create library for "Symbols" so i can use it in any drawing?
Thing is, I am creating a symbol in drawing and using it many times in one sheet.Now when i prepare a next drawing, i can not use the same symbol.so what i have to do is i have to create a symbol everytime for each drawing.I am not able to maintain consistency.
I was giving a hand drawn wiring diagram (original.jpg) and it is a rats nest!!
I was asked to re-draw this and put it on our drawing template.
I have the plugs and terminal blocks drawn up and now I am about to attempt to add in the wires, but the sketch is so filled with dimension lines and values, it is going to be a task to try and make sure every line I draw is correct. This would be much easier to do if the dimensions could be turned off as the wires I am drawing will not be constrained.
I don't think there is layers options inside a sketch mode, or a if i start a new sketch I don't think I can project that sketch to the new one?
The only other options I can think of was to delete all dimensions and apply FIX constraint to everything! or
I guess I could have modeled the plugs and blocks in position and added them to the drawing, projected the geometry to a new sketch and added in my wires??
Is there an option in drawing mode to exclude certain parts from a section view.
According to ASME Y14.3 parts such as shafts, keys bolts and nuts should be excluded in sectional view. Its not just removing the Hatching, the part has to show completely.
The closest I found in Inventor is that you can exclude Standard parts from being sectioned. Some of my parts are not in the standard library.
I would like to have the option to choose which parts I want to section and which ones I don't.
In the continuing persuit to learn Inventor, of this selection in the drawing view editor?I have noticed one thing. When it is checked it turns off the visibility of parts within an assembly view.
This is probably very easy using ssget or something, but I don't know exactly how that works. All I need to do is to explode any occurrences of a block with a particular name.
When I open a file or create e new file in CS5.1, it fills the screen. In CS3, at the bottom of the tool bar, is a tool "screen mode" that lets me open a file that doesn't fill the screen so that I can put two or more small files (images) on a new blank file. I have not been able to do that in CS5. I do not know how to show two (or more) files at one time in CS5.1.
I have a flexible sub-assembly in my top assembly. Sometiems I'm trying to demonstrate to others how a mechanism in the sub-assembly works using this flexibility feature. It works great, but when I move just one little part of a flexible assembly, Inventor displays the wire-mesh of the entire flexible assembly, because technically the entire assembly is selected, even though I'm only moving one part. It clutters up the screen very badly, detracting from what I'm trying to show.
Is there a way to prevent Inventor from displaying the selection lines? Either only when I'm moving a part in a flexible assembly (which would be great), or to just turn them off completely when I'm presenting like this? I know I can turn off pre-select, but that doesn't work, because once I start moving a part in the flexible assembly, the assembly is "selected" and the wire-mesh displays.
I'm scanning slides with the intention of showing them in HD. So I need to crop the 3:2 slide format to 16:9. Is there any way to view a selection full-screen other than an Action? At the moment I make the 16:9 selection, crop, jump to full-screen mode, remove the selection rectangle, and CMD-0 to fill the screen.
I have photoshop cs6, and I was just wondering how to save a selection in channel mode.
So for example (below), If i wanted to only copy the part of this picture that has white and the plant in the picture how would i do this? I've tried colour range but it didn't work so I am very stuck.
I go into component mode to select something, say vertices, the object then displays with the "sunrise" spread of red to orange to yellow and all the vertices are highlighted yellow dots. But I can't select anything. Not in face, or edges or vertices. I've tried resetting my preferences and restarting Maya and restarting my computer and restoring the Maya file(s) from my daily backups but nothing changes this. I even uninstalled & reinstalled Maya but still.
trying to mask a certain area of a face with another picture, so I use the quick mask tool to paint in the area, but when I exit it and enter standard mode, there is nothing selected. It does however act as if there is a selection, because the other layer only is added to that section.
Also, I don't know if this is related to the other problem, but when I move another image into the original one to create two layers, then select the overlay blending option, I am happy with how it looks. However, after adding the layer mask, the other layer is really pale around the masked area.
don't know if it's a mac/pc problem or if it's a CS6 problem. I have been working with photoshop on PC for the past 9 years or so. I recently had to switch to CS6 on Mac.
I can no longer place my cursor in the blend modes field and use arrow keys to quickly toggle through them to find the ideal mode. I used to be able to preview 15 blend modes in just 5-6 seconds and land on the ideal mode... and get on with my project. NOW i have to click this button and click again on each blend mode... lengthening my process by up to 2 minutes. This is an ENORMOUS problem for me as choosing blend modes is critical in my day to day design work.
See the menu right next to it where you can type in the opacity? I can put my cursor in there and use arrow keys to adjust values. Blend mode NEEDS to work this way too. And this is on a mac. You simply HAVE to do something here. productivity impacted severely.
Also.. this problem exists in After Effects CS5 on pc. Let's get it fixed there too. I will hand-write you a letter of praise and send flowers if you can do this.
In mesh edit mode, when you assign a material to the selection, it works as expected, it assigns the material only to what is selected, for example, a face.
In poly edit mode, it works differently, if you try the same approach it assigns the material to the entire object and you have to deal with multi-materials and material IDs to achieve that, what is very boring and totally unintuitive imho. Is there an option to make the poly editing mode work like the mesh editing mode, or at least another way to achieve the same result in a intuitive or at least 'visual' fashion?
When i use panning in 2D mode the drawing disappears from my viewport. Autocad and all tools are still visible but there is nothing in drawing screen. When i zoom extent(z+e) it comes back again but in a couple minutes it disappears again while i am panning.
Where is the setting to enable Single Drawing Compatibility Mode in 2013? It used to be under the system tab in the options and is not there in 2013. Is this option still available?
I want to open multiple drawings in the same AutoCAD window by double clicking a dwg file like I have always done. Is this still possible in 2013?
this in an issue ive noticed for a long time now across a few versions of ACAD, not sure whats causing it. When i try to draw an XLINE sometimes the command will get locked into either horizontal or vertical mode, without me choosing that option. seems to based on the OSNAP pickpoint i grab maybe.
attached are pics of the process.
i run XLINE, pick endpoint and bam, its locked into horizontal mode, very annoying if im trying to make a vertical and horizontal line based off the same point.