AutoCAD .NET :: Copying Selections From One Listbox To Another
Sep 26, 2011
I have two listbox controls on my form (lstAvailableLayers and lstLayersToUse). The lstAvailableLayers listbox gets populated by the following:
Â
Public Sub MaindialogTitleText_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim myDWG As Autodesk.AutoCAD.ApplicationServices.Document Dim myDB As Autodesk.AutoCAD.DatabaseServices.Database Dim myTransMan As Autodesk.AutoCAD.DatabaseServices.TransactionManager Dim myTrans As
[code]......
There is a button that is supposed to copy the selected items from the lstAvailableLayers listbox to the lstLayersToUse listbox:
Private Sub btnMoveLayers_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnMoveLayers.Click If lstAvailableLayers.SelectedIndex < 0 Then MsgBox("You must select at least one layer", MsgBoxStyle.Exclamation, "Error") Else Dim i As Integer For i = 0 To lstAvailableLayers.SelectedItems.Count - 1 lstLayersToUse.Items.Add(lstAvailableLayers.SelectedItem) Next End If End SubÂ
I select 2 layers from the list and hit the button, and the first selected item gets copied twice to the second list. I've looked all over the place and I keep seeing similar code to this that's supposed to work.
What i want to do is popluate a Listbox with with the area of previously selected Objects.This is what i have at the moment:
i = 0ListBox1.ColumnCount = 2For Each ssetOBJ In sset objarea = ssetOBJ.Area i = i + 1 With ListBox1 .AddItem .List(.ListCount - i, 0) = "Fläche" .List(.ListCount - i, 1) = objarea End With Next.
 But the code only writes the area of the last Object in the first Row of the Listbox.I think in the FOR EACH Expression the variable "i" pass always "1" for the Row Number.
I have listbox that shows ipartname of one ipartfactory it would like and me that when selecting one of them it could send to the assembly ipart selected hear show code.
Dim InvApp As Inventor.ApplicationSet InvApp = GetObject(, "Inventor.Application") Dim IpartSeleccion As ipartMemberSet IpartSeleccion = listbox1.Value Dim oDoc As AssemblyDocumentSet oDoc = InvApp.ActiveDocument Dim oOccs As ComponentOccurrencesSet oOccs = oDoc.ComponentDefinition.Occurrences
I've made a simple list box with some text entries. I can drag from any node to Acad's Drawing area and drop it. And without writing any code to capture Drop event, same text is written there in Top Left corner of Drawing area.
I want to Catpure this Drop even of Acad Drawing area. I will then be able to use Jig classes to add my own entities.
I tried Application.DoDragDrop() method and invoke DragTarget.OnDrop() but confused very much
I am trying to fill a selection in one picture with a selection from another picture. I am having problems scaling the selection to fit exactly. i still have an outline from the other (previous) selection.
I opened both images up side by side, Adjusted the view on both to 33%, made my first selection, hit control + c, made my selection on the other picture (Exact same shape), hit control + v + shift, then edit>transform>scale, then shift+drag.
Can't get it to line up. I also tried layering the two images then reducing the opacity of just the selection, but photoshop reduces the opacity of the entire layer instead of just the selection,
MY ribbon has stopped changing with selections. It used to show hatch options when the hatch command was active, it no longer does this... It would also show hatch options if I selected a hatch with grips, and show other options for other entities if selected with grips, it no longer does this.
I'm having issues trying to create a point table. I have used this process before with no problem but now for some reason C3D won't create the table. I get an "NO VALID SELECTION" after selecting the C3D points. Why I'm getting this error? All my points are C3D points and C3D recognizes the points while the POINT TABLE CREATION menu is still visible but once it goes to create the table i get that error message.
I have 2 selection sets and I'm looking for a more elegant method of checking if both sets contain the exact same entities (note - the order of entities might be different).
I am operating a Dell Windows system, 2 gig's of ram and using Photoshop CS3. While using the erasure tool to convert background to checkerboard transparency so that image can be selected for transfer to another background, after saving and reopening, the background lost the checkerboard and became totally white. In this state, the image cannot be transfered. Any suggestion on how I can convert the background back to the checkerboard status to allow transfer of just the image?
I purchased a big jpg file from an online stock image provider that has a collection of items (a collage of 200 fruits in this case). I now need to extract individual fruit images from this big collage. By using photoshop selection tools I was able to select all the individual fruits in the image and now want to create new individual png's for each of the selected fruits in the image. Is it possible to automatically create a layer for each of the individual selections so that I can use Script -> Export Layers To Files .I have been looking for a solution online but to no avail.
I have the selection saved, I want to load another selection within while subtracting ? I tried the boolean methods, I searched the manuals, even AdobeTV for an answer, I know it can be done, I'm having a brain fart
I've been developing a script that uses 2 selections saved in a PSD file and have created various files with the selections saved while testing things. I would select an area in a tif, choose Save Selection from the Select menu and the dialog that displays allows me to name the selection into a new document. Select an area in a 2nd document, do the same thing and the dialog defaults to the same file into which the previous selection was saved. Worked great, many times. Earlier, however, I was all of sudden unable to save the two selections into the same document. When I created the two selections in separate documents and dragged a channel from one document to the other (to create the 1 doc with the 2 selections) Photoshop would then not allow me to load selections at ALL. Now, everything seems to be working as it should! I don't THINK I've changed anything and some of the files I used unsuccessfully earlier just worked!
I have been working on a piece of work in photoshop which requires me to make numerous selections and save them. So far I have made 20, and it will not let me save any more unless I overwrite old ones. Is their a way of increasing the amount of selections that can be made, or a way of deleting the uneeded ones.
I've got a pic of...say...my son. I place a pic of a transparent CD on a layer on top of the son. I select the cd (that is a circle selection...) and I now want to sort of magnify what shows of my son within that selection...
I have been trying to figure out a way to add to a selection. What I mean is I draw a path with the pen and then save that and turn it into a selection and save that too. The problem is when I want to change the path of the selection using the pen tool it just gives me this funky path after the selection is made. When working on multible layers I need to use the same selection and due to the complexity of the object and impractibility of re-doing the whole selection again with the pen tool without the part of the layer that I don't want.
Would it be better to bring up the saved path, delete or move a few anchor points and resave the path? The problem with this is I believe it will discard the old path that I made first and I can't have that.
I am using CS3. when I am in a document (new or opened) I will make a selection and fill it. Even though I have 0 px for the Selection tool and 0.2 under Select/Modify/Feather, when I fill it it is feathered, quite a bit I might add. However, if I select the brush tool, make a few strokes with a hard brush somewhere, then make another selection and fill it, it's no longer feathered.
I just installed CS2, and I can only use the eraser tool to erase if what I'm erasing is inside a selection. Otherwise I click and try to erase but nothing erases. Even when I drop selection (ctrl D) and there is NO selection, I still can not erase. I have to select all (ctrl a) in order to erase anything in the workspace.
I have Photoshop CS3 and am having trouble with selections.
Let's say I just created a new blank document at 1024x768 pixels. I create a new layer and make a new randomly sized selection with the Rectangular Marquee tool. I fill that selection with black and now have a simple black box on a simple white background.
I press Ctrl-T for the Transform tool and in the Width box on the toolbar I type 800px and press enter. Now I expect my black box to be 800px wide. But when I select it and click the Info tool I see that my box is in fact 799px wide. Sometimes I try to change it to 800px again and when I look at the info tool the box is now 801px! Why is this?
Second question.. when I fill a selection using alt-backspace I notice that the edges are feathered even though I have feathering set to 0. If I alt-backspace several more times I get a solid fill, but I'd like to only have to do it once. Where is this setting?
I have the following code that lets me copy a selection and paste it to another area a given distance away. I now need to paste it into another file but have had no success after searching for help online.
Dim SP1sel1(0 To 2) As Double          Dim SP1sel2(0 To 2) As Double          Dim SP1copy1(0 To 2) As Double          Dim SP1copy2(0 To 2) As Double          Dim objSS As AcadSelectionSet          'Dim str0pt As String          'Dim lngMode As Long [code]...
I have a drawing with a table on it that I need other people to be able to fill in. As they don't have access to AutoCAD I thought the best way would be to copy it into word and add the table in there. My problem is I can only get the contents of a viewport to copy if the visual style is set to 2d wireframe using the COPYLINK command. I need to use conceptual and a custom visual style. WMFOUT, JPGOUT and BMPOUT are the same as well. PDFs export ok but I'm having trouble copying to word through that.