![]() You selected the objects, selected copy w/base point from the menu and then clicked on your desired basepoint. this made copying items from one drawing file to another file very easy. If (X) = True Thenĭocname = (X)Īpplication.Documents(Docname).Ok, so I'm a long time Autocad user and there was a tool in autocad called Copy w/ Base Point. Tried "_pasteblock" in the source dwg and it seemed to workįor X = 0 To - 1 Probably be using "_pasteblock" instead of "_pasteorig". This is the action button in the PickTarget form. ![]() Private Function ZapSSSet(ssname As String) As Integerįor Each sset In ThisDrawing.SelectionSets ' zapz existing ss if there is one, returns 1 if so ' Add entities to a selection set by prompting user to select on the screenĬmdStr = "_copybase" + vbCr + "0,0" + vbCr + "prev" + vbCr + vbCr ![]() I'm afraid you'll have to sort through the stuff that does not apply:: Using the "_pasteblock" command instead of "_pasteorig". Want to do that unless one was changing UCS or one was The same drawing, though I would not know why one would It does use the "_copybase"Ĭommand and "_pasteorig". I've got something that copies and pastes to the originalĬoordinates between files. ThisDrawing.SendCommand "move" & vbCr & "last" & vbCr & vbCr & RegPt(0) & "," & RegPt(1) & "," & RegPt(2) & vbCr Set Insblk = (RegPt, InsFilename, 1, 1, 1, 0) If ThisDrawing.GetVariable("ctab") = "Model" Then InsFilename = GetSetting("AutoDesk Applications", "MJCop圜lip", "TempFile") RegPt(1) = GetSetting("AutoDesk Applications", "MJCop圜lip", "InsertionPointY") RegPt(0) = GetSetting("AutoDesk Applications", "MJCop圜lip", "InsertionPointX") Public Function MJPaste(PasteType As String)ĭim InsFilename As String, InsPt As Variantĭim Insblk As AcadBlockReference, Insblkname As String If CopyType = "CutClip" Or CopyType = "CutBase" Then If CopyType = "CopyBase" Or CopyType = "CutBase" Then SaveSetting "AutoDesk Applications", "MJCop圜lip", "TempFile", TempFilename ![]() SaveSetting "AutoDesk Applications", "MJCop圜lip", "InsertionPointY", MinY SaveSetting "AutoDesk Applications", "MJCop圜lip", "InsertionPointX", MinX TempFilename = TempPath & TempTime & ".dwg" TempTime = Mid(TempTime, 1, 8) & Mid(TempTime, 10, Len(TempTime)) TempTime = ThisDrawing.GetVariable("cdate") TempPath = ThisDrawing.GetVariable("tempprefix") ' grow the group's bounding box to include the object's ' Get the Upper (x, y) of the bounding box of the entity ' Get the Lower (x, y) of the bounding box of the entity ' Get the bounding box of the current object ' (first one has already been done so start at one) ' Iterate through the objects in the selection set ' Get the bounding box of the first item in the selection set (if Sel Set is not empty) ' Add entities to a selection set by prompting user to select on the Screen Set ss1 = ThisDrawing.SelectionSets("CopySet") ' Add a selection set, if it already exists, set it to be active Set pfss = ThisDrawing.PickfirstSelectionSet OldInsBaseVal = ThisDrawing.GetVariable("Insbase") ' This sub returns a bounding box of entities selected on screen.ĭim lBox, uBox As Variant, pfss As AcadSelectionSet, ss1 As AcadSelectionSetĭim I As Long, MinX As Double, MinY As Double, MinXY(0 To 1) As Double, MaxX As Double, MaxY As Doubleĭim TempPath As String, TempTime As String, TempFilename As Stringĭim OldInsBaseVal As Variant, NewPoint As Variant Public Function MJCopy(CopyType As String) I have used sendcommand for this, but when I use the middle mouse button to pan, the function continues on and screws up the insertion. One of the problems I am having is when pasting, I wish to be able to see the objects (dragmode). To do this, I had to ignore the current copyclip and pasteclip and write new ones. I have written a Function to copy and paste from autocad that will allow someone to paste to original coordinates within the same drawing.
0 Comments
Leave a Reply. |