AutoCAD Inventor :: Change DimStyle To Active Standard?
Jun 20, 2012
Changes all dimensions, balloons, ect (define more if you want) to current object default in active standard.
Sub ChangeDimStyle()'J.Kriek 2012 Dim oApp As Application Dim oIdw As DrawingDocument Dim oDim As DrawingDimension Dim oBalloon As Balloon Dim oDimStyle As DrawingStandardStyle Dim oSheet As Sheet Set oApp = ThisApplication
I am trying to have one drawing with B size and E size sheets I am trying to get the border, title block and standard to change when the sheet format changes. I can get it to work when I run the rule but have hard time find information to just change when sheet format changes. And I can't find anything or I should say a sample of how to. I think I found the code just don't know how to make it work. Here is what I have so far.
I'm new to the style library and how to take an existing drawing that was created on one standard, and changing it to another standard I just created. The new standard has different dimension styles, text, and layers. I've added all the styles to my style library and I've set the new standard to the active standard in both the styles and standards editor and the document settings. If I create a new view, it comes in on the new standard, but the existing views are still on the old. How to I get the existing views on the new standard?
On a daily basis I work with two different types of drawings; machining and fabrication. The machine shop prefers dimensions in decimal inches, and the fab shop only understands fractional inches. Is there any way to set up the styles/standards/templates to allow me to pick out which type of drawing I am creating and have Inventor use the correct object defaults for the dimensions?
I couldn't found a way to change the materials of the standard parts in Inventor, so i made a (quick and dirty) VBA program so i can change the material and color of the publiced (and used in projects) parts.
I need ot append events when the dimstyle is change using the AutoCAD dimstyle popup list, but don't know which reactoer to use. I tried with Comman begin and end, and Sysvawill change and changed, but they don't detect the dimstyle changes.
I'm having some problems with drawing paths in Illustrator. Everytime I draw a new path, this new path shows up in the standard settings. The 'brush defenition' turns back to 'basic' and the 'variable width profile' back to 'uniform'. It would save me a lot of time if I could change those standard settings into what I prefer.
Is there event for change current (active) layer of document?
(it's not Database.ObjectModified - it's not raised).
I tried to do it with binding as:
public void Initialize() { var layerList = Application.UIBindings.Collections.Layers; layerList.PropertyChanged += new PropertyChangedEventHandler(LayerList_PropertyChanged);
And -= in Terminate, but... Autocad 2012 chashed _sometimes_!!!
Impossible to understand when it happened. So I reject this way. Is there other way to handle this event?
I'm trying to change the active document window size with vb.net. This seems like it should be straightforward, but I'm having some trouble. Below is some code that I tried to use which I found on the AutoCAD DevBlog.. I thought I understood how this works, but I can't seem to import the correct references to make it work.
Dim doc As Document = Application.DocumentManager.MdiActiveDocument() Dim docWindow As Window = doc.Window Dim size As Size = docWindow.Size docWindow.WindowState = Window.State.Normal docWindow.Size = New Size(500, 500)
I am trying to publish to the CC a guide rail. The vendor of the rail gives me the option of entering the desired length of the rail. After that he gives me the option to choose between the length that I entered and a shorter and longer standard length witch can be delivered faster.
I want to do the same thing with my published part, but I cannot make a key parameter to change depending on the entered custom parameter. I want the user to make the next steps when inserting from the CC: 1- select the size of the rail; 2-select the type of the rail; 3- enter the desired length of the rail; 4- choose between the desired length and the 2 recommended lengths (I need these 3 lengths to be shown)
If I move my cursor within 25 pixels of a transform control, it activates it. So, on smaller objects it becomes impossible to slide them. Because every time I have the mouse over the object, it is snapping to a transform handle.Thus, when I click, I am now either rotating or scaling the object.
Is there some way to limit this active area to only 3 pixels around the handle, or turn off the cursor snapping to them?
It does almost what I need it to do. except that it also copies the ".ai" in to the layer name. Is there some way to modify this script to have it exclude or delete the file extension?
Apparently, in the CS3 is impossible to do any scripting and using any actions. Can it be done using plugins sdk, without creating a new document? I tried using the functions SetPageSetup and SetCropBox but no effect
Since Edge only has rectangles and ellipses built in as available shapes, how to I/we work with polygon shapes and active mouseover areas INSIDE of these shapes and non-active mouseover areas OUTSIDE of the shapes?
Problem/symptom: when I import a polygon, be it any file format from from Photoshop or SVG from Illustrator, a rectangular border/background (transparent) gets applied, leading to this rectangle defining the mouseover area of the shape - and not the shape itself (be it a star or whatever).
WHAT I WANT: the very shape defines the mouseover area. How do I achieve this?? See examle below:
I like the dark skin, but it seems more difficult to grab the bottom of the Color Gallery in order to stretch it down. The Grey was easier. The area where the mouse converts to the double arrow is quite narrow. At least for an old shaky man like me. Is there a REGEDIT value I could change to widen the "active" area of the gallery borders for the purpose of stretching them?
How to go about making it only change the color of text frames on the active layer? In the final script I will hide all other layers so if it could be done by a visible attribute more easily that would work just as well.
Where are the options to add objects & ActiveX objects to the VBA project? i can reference them but thats it... Have i got to do everything late binding or can i drag an object onto a form in design view?
How you can keep constraints active in sub assemblies so that when I am moving a subassembly the extra movement say in a transitional constraint is able to move so I can see if the total movement allowed is to much?
Trying to create a bit of code that when the 'OnNew Document' event is fired the code checks for a particular Custom Property. Depending on what the Custom Property is set to a form is then fired with relevant text to point the user to a specific area in the workspace. Al this works ok.
But if they press cancel i need the code close the activate 'Part1' which inturn then allows the user to select 'New' to begin again.
I have tried various scenarios but the main problem is that Inventor then crashes!
PublicSub applicationEvents_OnNewDocument(DocumentObject As Inventor._Document, BeforeOrAfter As Inventor.EventTimingEnum, Context As Inventor.NameValueMap, ByRef HandlingCode As Inventor.HandlingCodeEnum) Handles applicationEvents.OnNewDocument
So here's the situation: I have been importing parasolid files into Inventor. When doing so, a folder named "Imported Components" would pop up right next to the parasolid file, with individual Inventor part files of all the assembly parts in the parasolid file.
This close the document but brings up the following Error msg...
Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))
Any better piece of code that shuts down the active document but doesn't return the error? (I only want to shut down one document, not the application)