Stimey Posted August 26, 2014 Share Posted August 26, 2014 I am looking to select a group of titleblocks and have them plot in order based on the page number (attribute value).... 1,2,3,4... I have something that plots them, they just get plotted based on insertion sequence. Is it possible to place the selection set in order, then plot it? A little something to push me in the right direction would be nice. Thanks in advance!!! (Publishing from paper space not an option.) Quote Link to comment Share on other sites More sharing options...
BIGAL Posted August 27, 2014 Share Posted August 27, 2014 This will plot a range of layouts, you could modify and check each layout for sheet number and plot ;Plots layouts by range ; By Alan H Feb 2014 (defun AH:pltlays ( / lay numlay numend) (setq numlay (getint "\nEnter Start tab number")) (setq numend (getint "\nEnter last tab number")) (setq len (+ (- numend numlay) 1)) (repeat len (vlax-for lay (vla-get-Layouts (vla-get-activedocument (vlax-get-acad-object))) (if (= numlay (vla-get-taborder lay)) (setvar "ctab" (vla-get-name lay)) ) ; if ) ; for (setq lay nil) (princ name) (COMMAND "-PLOT" "Y" "" "\\\\PRODPRN03\\100B-Lev5-01-CLR-PRN03" "A3 (297 x 420 mm)" "m" "LANDSCAPE" "N" "W" "-6,-6" "807,560" "1=2" "C" "Y" "DesignLaserCOLOUR.ctb" "Y" "N" "N" "N" "N" "N" "y") (setq numlay (+ numlay 1)) ) ; end repeat ); defun (AH:pltlays) Quote Link to comment Share on other sites More sharing options...
Stimey Posted August 28, 2014 Author Share Posted August 28, 2014 BIGAL, thanks for the reply, but I made a rookie move & didn't explain correctly.... I currently have a VBA routine that allows me to select a group of title blocks in Model Space and have them plot to a predetermined page setup that the routine allows me to stop & select. The problem is that it plots them in reverse of how they were added to the drawing. Simply reversing the order won't do as they get deleted and reshuffled on screen from time to time. SO..... I would like to add something that will plot them in order of the drawing number attribute. I can force the numbering to always be 1,2,3..... but would like to be alpha numeric if possible. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted August 29, 2014 Share Posted August 29, 2014 A different version was plot all title blocks in model space, so in VBA get a list of your title blocks then loop through that list and check version number if it matches start No then plot, add 1 to start, rescan the list again plot No 2 now and so on, just keep re searching list of title blocks, here is a simple read attribute for VBA. FilterDXFCode(0) = 0 FilterDXFVal(0) = "INSERT" 'FilterDXFCode(1) = 2 'FilterDXFVal(1) = "SCHEDTEXT" Set SS = ThisDrawing.SelectionSets.Add("pit1sel") SS.Select acSelectionSetAll, , , FilterDXFCode, FilterDXFVal For Cntr = 0 To SS.Count - 1 If SS.Item(Cntr).Name = BLOCK_NAME Then attribs = SS.Item(Cntr).GetAttributes If attribs(0).TextString = sheetnum Then ' the ablock attribs start at (0) 4 atrribs = (0) (1) (2) (3) do your plot thing here Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.