AutoCAD Inventor :: Component Occurrence In Drawing View To Hidden Line Style?
Jan 5, 2010
Can this be done? I want to go through the DrawingView Object to get at a subcomponent of an assembly and either set that component to have hidden lines (where needed) or no hidden lines.
I am working on a project to assign balloons to components in drawing view automatically. Of course, I don't want to assign a balloon to a component which is invisible (hidden) in this drawing view.
So, is there any API function to check whether the component in the drawing view is invisible or hidden?
II need a way to tell if a component occurence is a virtual component.
I'm using a For Each loop to cycle through all of the components in an assembly, and if the component is itself an assembly to set the LOD to "Custom". I'm using the definition document descriptor object for this. It all woks fine until the loop comes across a virtual component which doesn't have a definition document, so I need a way to check if the component is virtual and needs to be skipped.Here's the
Option ExplicitImports Inventor.LevelOfDetailEnumSub MainiLogicVb.UpdateWhenDone = TrueDim doc As AssemblyDocumentDim oLOD As LevelOfDetailRepresentationDim oAsmCompDef As ComponentDefinitionDim oComp As ComponentOccurrenceDim oComps As ComponentOccurrencesdoc = ThisDoc.DocumentIf. [code]....
I made a drawing, but after using ilogic (ilogic is in drawing,assembly, part) in it, drawing view of a particular part is coming in hidden line, other are shaded as u can see in image.
Drawing view is associative, all edges shown, level of detail is master, view style is Hidden Line Removal with Shaded
Computer Config:
Inventor 2013 Intel Xeon CPU 2.67 GHZ 8 Gb ram Windows 7 64 bit
I love the new triad function when placing a new part in Inventor 2014: I am now searching to trigger the same function for a part that already has been placed.
Something like:
1) select component
2) press a button (triggers the macro I now want to write)
3) the triad pops up.
I searched true the Inventor Help & what's new in the API. But didn't find any reference to that command. So I am afraid that it is not yet in the API. Could I maybe emulate it by replacing a component with itself using the place component command + emulating a mouseclick at the same origin as the original piece?
So a piece of code like:
1) get filelocation of selected part
2) get the origin point (x,y,z) of the part
3) get the translation between the origin of the assembly and the part
4) delete the selected part
5) place the part using the place component command (so the triad has been triggered)
6) fill in the filelocation, origin & translation
7) give control back to the user so he can move the part using the triad.
I have a simple code below trying to iterate through all the assembly component and copy the iProperties > Occurrece Name (i.e. "Part1:1") and paste it to iProperties > Project tab > Part Number field for each individual part in assembly.
' set a reference to the assembly component definintion. ' This assumes an assembly document is open. Dim oAsmCompDef As AssemblyComponentDefinition oAsmCompDef = ThisApplication.ActiveDocument.ComponentDefinition
'Iterate through all of the occurrences Dim oOccurrence As ComponentOccurrence For Each oOccurrence In oAsmCompDef.Occurrences Dim oName As String oName = oOccurrence.Name iProperties.Value(oOccurrence.Name, "Project", "Part Number") = oName MessageBox.Show(oOccurrence.Name, "iLogic") Next
The Debug message shows the correct output for every iteration, but when I check each part's properties they all have the Occurrence Name of the last part in the aseembly.
In solidworks there's a "hidden line" option that displays a 3d part with all its sketch lines (instead of a regular solid) which allows the user to view all the different sides of the part easily. So I was wondering if there's such an option in autodesk inventor 2013. Currently, to view all the different sides and aspects of a part easily, i have been changing the part's material to polycarbone or some other plastic material; this makes the part a little translucent. But this is less effective than the hidden line vew availble in solidworks. method that makes different parts of a 3d part more easily to be viewed?
I am using this code to turn visibility of components off in IDw file, what I need top turn visibility of a component of in a subassembly.
'oDrawingDocument = ThisApplication.ActiveDocument 'Get the first view 'Dim oView As Inventor.DrawingView 'oView = oDrawingDocument.ActiveSheet.DrawingViews.Item(2)
But it seems that the onselect event only catches selection of drawing views or balloon, annotation etc, but not the component inside the drawing view is this intentional or a bug?
The reason i need to catch this is to make a new context menu action, so i need the selected item. I know i can use SelectionSet, but i want to be able to debug my application as an external application connecting to the running instance before i build it into an addin (saves me a lot of inventor restarts..) And Selection Set does not seem to work when i use it inside an event handler in an external application...
Is there a way of using Ilogic to make hidden lines of specific parts in an assembly drawing view visible? If a part with hidden lines showing is suppressed and then unsuppressed the hidden line option becomes unchecked, therefore I need a way of rechecking this option through code?
When i try and plot my 3D model in the Hidden style, so it simply looks like a black line drawing the plot comes out weird. The plot for some reason adds a thick black line around my entire plot, and makes all the other lightweights look faded out. How can i fix this??primary bar 3-Layout2.pdf
I have surface style (could be slope or spot elevation) with a 2 line component, and text component above and below the line. I'm trying to create on style for many options. I'm using c3d 2013, but moving to 2014.
I would like to do the following after placing the label:
1. adjust the length of the line component. (ex: as I rotate the lable, the length of seg 1 changes ) 2. turn off one of the line component 3. adjust the angle of one of the line component. 4. when drag, the length of the line changes to a new value.
and while I'm asking, is there a way to move/rotate/drag the syle to a percise distance. I want the leader to be 1 unit long at 30 degree angle.
I'm trying to plot 3D objects with hidden lines. I've set the viewport SHADE PLOT property to "Legacy hidden" and set my visual style to 2D Wireframe with 2D Hide-Occluded Lines linetype set to "Dashed". The hidden lines do appear, but I don't like the size and spacing of the dashes. Is there a way to add "Hidden" linetype to the selected visual style? Or perhaps there's a way of adjusting the linetype scale for visual style occluded lines (similar to LTSCALE or PSLTSCALE command)?
I am working on some codes that let me make some change on visibility of occurrence. So I am I main assembly, and 3 occurrences of the same sub-assembly. The sub assembly was saved on a design view named hole that is hiding some occurrences.
if I work with one of those sub assembly (checkOcc as component occurrence)and then I try this:
Debug.Print("Occurence name: " + CheckOcc.Name) Debug.Print("Is DRV associative: " + CheckOcc.IsAssociativeToDesignViewRepresentation.ToString) Debug.Print("The Active DRV is: " + CheckOcc.ActiveDesignViewRepresentation.ToString) CheckOcc.SetDesignViewRepresentation("Default") Debug.Print("Is DRV associative: " + CheckOcc.IsAssociativeToDesignViewRepresentation.ToString) Debug.Print("The Active DRV is: " + CheckOcc.ActiveDesignViewRepresentation.ToString)
The first time I check for the name, the result is empty, but is should hole as it's what I can see in the browser. then I change it to default.The result of that, the representation views disappear from the browser for that occurrence and still, the name is return as empty...then I carry on with turning on the hidden occurrences.
The result, all the hidden occurrence appear ALSO on the other subassemblies... It look that it's affecting all the Designview of all occurrence of that name...then, if I try the reverse, by turning it off... the switch off on the other occurrences but not the one that is checkoff!!
In a drawing I'm looking for components that have a certain iProperty. If they have the iProperty, I want to turn every occurrence of that item red.
I can get the occurrences fine, but I'm unable to properly get the drawing curves so I can turn them red. I'm using code from this post on ModTheMachine: [URL]........
Is there a way that we can set the view label in the style library to show custom/user Properties?
We have set our iam/ipt templates to have some custom properties which we wish to display in the view label when the view is created however there this no way to add these properties to the label.
I find this a little strange as you can add these user Properties to the parts list in the style library? (I've added some screen caps to show what I am talking about)
Basically I want to place parts and have them automatically connect to each other based on pre-existing UCSs on the assemblies. I have a 'ucs_in' and a 'ucs_out' on each assembly. I want the inserted component to perform a transformation to make the new occurrence's ucs_in to "mate" to the previous occurrences ucs_out. By mate I mean their center points are at the same location and all axes are pointing in the same direction. I have included screenshots to show what I'm working with and what I am trying to accomplish. I have also attached the project files.
Below is my attempt at the code to do this. My experience with transformations is limited so I may be way off from where I need to be.
Sub UcsMate() Dim doc As AssemblyDocument Set doc = ThisApplication.ActiveDocument 'assuming both occurrences are already in the assembly and both have 2 UCS, "ucs_in" and "ucs_out" Dim occ1 As ComponentOccurrence Dim
From a main assembly I am trying to change the visibility of occurence that are in a sub assembly. But everytime I change the visibility using the designviewrepresentation.setvisibilityofoccurrences(), that change the visibility of those occurrences in the other sub-assembly. Of course, if I do it thought the interface that works great. Anyone did something with changing visibility of sub component.
It appears various people are posting things that are posted in the Readme. For Nitrous these are:
• To prevent issues with Nitrous, ensure you have the most up‐to‐date system drivers. For specific details, see the sections about 3ds Max 2012 / 3ds Max Design 2012 found at URL.... • Applying Unwrap UVW after painting in 2D with Viewport Canvas and painting on top of the Unwrap UVW can sometimes cause 2D paint to fail. Workaround: If this occurs, apply an Edit Poly modifier on top of the Unwrap UVW modifier. • Civil View parameters can cause a program error when modifying surface parameters. • Object Color display will show the object’s material color when set to object color. Workaround: Enable Use Environment Background and Display Background in the Viewport Background settings (Alt+B). • Locking the computer can cause the viewports to stop responding in some cases. Workaround: If this occurs, restart the program. • Mirrored or negatively scaled objects might display face edges incorrectly. • The Soft selection Shade Face Toggle does not always properly display the shaded faces. • MassFX constraints can cause Dummy objects not to display in Realistic mode. • Body Objects display tessellated/triangulated edges instead of the proper Body curves. • Back faces display as transparent. • Hidden Line style does not display texture maps in the viewport. • Tone Mapper used with a Skylight set to use the mr Physical Sky environment will display a black background when enabled. • Enable Gamma/LUT Correction does not work on stylized viewports. • Very large textures (10K x 10K) can cause a program error. Workaround: You can control texture sizes with MAXScript: NitrousGraphicsManager.SetTextureSizeLimit 512 true NitrousGraphicsManager.SetBackgroundTextureSizeLimit 1024 true
We just recently upgraded to Inventor Pro 2014. I have a user who has created a singled shaded view drawing. He want to print the drawing shaded. When he prints he gets a line drawing. It even appears like a line drawing when he previews it. He gets the same results when printing to Adobe. He said it printed properly in the morning yesterday and when he tried to print again in the afternoon it would not print shaded. He rebooted this morning and he still can't print a shaded drawing from Inventor. We looked at his printer settings and everything looks good. He is the only one in my department who is having this problem.
I need to draw a couple of hidden lines into a drawing. I see that it is not in my database when I go to Modify/Properties, it does not exist. I am using either v 2000, or v 2007 if it matters.
Many is the time that I need to have hidden, or dashed lines added to a drawing. I do this by putting LTYPE in the command line then loading the dash or hidden line that I want. The problem is that long after I have done this, I get a dashed line on any line that I attempt to draw. Even if I dimension something, the arrows and lines are also dashed lines. I go back into Modify Properties and LTYPE and attempt to delete the line types that I have added and I am not allowed to delete them.
Why line display in model view and layout view could be different?
For example, a line of width 0.35mm and short dashed style is displayed correctly in model view, but in layout view is displayed as thin as the default width, and its dash style is also changed (dash length and interval).
He makes a detail. In the enlarged view he makes a sketch. He then makes a break out. Within the enlarged view, in the gap which the break out opened up for clarity of the view, are two components that he wishes to make its hidden lines visible. Doing this locks up his machine and makes a single component turn red.
Is it possible to show hidden lines in one part of a .idw view while the rest of the view does not show hidden lines? In the attached image I want to show the pull handle and towel bar through the glass in the door. The only way I know how to show this currently is to turn off the visibility on the glass.
Inventor 2013 Windows 7 Professional 64-bit SP1 HP EliteBook 8470w Processor: Intel(R) Core(TM) i7-3610QM CPU @ 2.30GHz Memory: 16 GB AMD FirePro M2000 3D Connexion SpacePilot
When I create a section view in the idw, hidden lines are visible in the cutting part ! How disable these hidden lines and show only the hidden features ?