D.S

adndevblog.typepad.com

Comments on Copying a Body from One Part into Another Part

Comments on Copying a Body from One Part into Another Part Comments on Copying a Body from One Part into Another Part Tobias M commented on 'Copying a Body from One Part into Another Part' Hi! I tried your code on two intersecting tubes that i want to sculpt. I am able to create a surfacebody of Tube2 in Tube1. But i am not able to create an adaptive surfacebody. Everytime i set "featureDef.IsAssociative = True" i got an error reading 'Wrong Parameters' Could you help me out? Thanks AlexNester commented on 'Copying a Body from One Part into Another Part' So I solve problem I Create InteractionEvents and create objectcollection for second selection Set transObjs = ThisApplication.TransientObjects Set col2 = transObjs.CreateObjectCollection For i = 1 To JustSelectedEntities.Count Set sourceBody = oSelect.SelectedEntities.Item(i) Next For Each SelectedEntities In oSelect.SelectedEntities col2.Add (SelectedEntities) Next AlexNester commented on 'Copying a Body from One Part into Another Part' Private Sub Zamki_Click() Set oInteraction = ThisApplication.CommandManager.CreateInteractionEvents ' Set the prompt. oInteraction.StatusBarText = "Select an edge." ' Connect to the associated select events. Set oSelect = oInteraction.SelectEvents ' Define that all part edges should be selectable. oSelect.AddSelectionFilter kPartBodyFilter ' Enable single selection. oSelect.SingleSelectEnabled = False ' Start the selection process. oInteraction.Start End Sub Private Sub oSelect_OnSelect(ByVal JustSelectedEntities As ObjectsEnumerator, _ ByVal SelectionDevice As SelectionDeviceEnum, _ ByVal ModelPosition As Point, _ ByVal ViewPosition As Point2d, _ ByVal View As View) ' Calculate the length of the edge(s) selected. Dim i As Long For i = 1 To JustSelectedEntities.Count ' Since we set the filter to only select edges it's safe to assign ' the returned entities to an Edge object. Set sourceBody = JustSelectedEntities.Item(i) Next End Sub to sorceBody set only one last entity. May be I need set sorcebody as matrix ? AlexNester commented on 'Copying a Body from One Part into Another Part' Thank you very much As I understand need create the class "clsSelect" (like in tutorial) I can do multi select But How add to Pick new objects ? Set Pick = oSelectedEnts.Item(1) Besides How shoot down selection Outside the class? I just need selection like in frame generator (trim/extend operation) after push button activate selection (after push button apply (I think so) stop selection) Brian Ekins commented on 'Copying a Body from One Part into Another Part' The Pick method is a simple way of getting a single selection. For more control over the selection process, including getting multiple selections, you can use the InteractionEvents object. It's more difficult to use but provides a lot more functionality. AlexNester commented on 'Copying a Body from One Part into Another Part' Set sourceBody = ThisApplication.CommandManager.Pick( _ kPartBodyFilter, _ "Select a body to copy.") If I need select more then one SurfaceBodyProxy?