Having trouble selecting the title block

Having trouble selecting the title block

angelinabrown0123
Advocate Advocate
1,543 Views
26 Replies
Message 1 of 27

Having trouble selecting the title block

angelinabrown0123
Advocate
Advocate

please help,

I am trying to print by selecting the title block, my block name is "MyBox" but it is not getting selected, please fix this code in selecting the block.

0 Likes
Accepted solutions (2)
1,544 Views
26 Replies
Replies (26)
Message 21 of 27

Sea-Haven
Mentor
Mentor

Just a comment as your using fit for the plot you could do any size like A3 also, only issue is the plot is not near true size when hard plotted, yes I know "Do Not Scale Drawing. But that is why I suggested using a layout.

 

Again if you try that way you will make life so much easier for your self. Your autoplot will work every time and be at scale. Stuff like plot multiple layouts I have done 88 in one go. 

 

You want multiple title blocks again have a look at your dwg 3a in post 15.

 

Do I have plot all title blocks in model space answer is yes but with odd UCS will not work.

 

0 Likes
Message 22 of 27

pbejse
Mentor
Mentor

@angelinabrown0123 wrote:

@pbejse 

Currently there is only one title block in the drawing. But in future there may be multiple title block in the single drawing.


Ok, we will deal with mulitple title blocks later.

Command: SPA1

Printing D:\Downloads\Sample 4.pdf...Effective plotting area: 569.99 wide by 807.00 high

 

Note: Be mindful when pdf file exists and opened...  [ well, you'll know it when you see it 🙂 ]

 

Refer to attached file: SPA1.lsp

 

HTH

 

Message 23 of 27

angelinabrown0123
Advocate
Advocate

Thanks for the lisp and Tips🙂

0 Likes
Message 24 of 27

angelinabrown0123
Advocate
Advocate

@pbejse 

Your new lisp showing "Command: SPA1 ; error: ADS request error" error on my AutoCAD.

 

0 Likes
Message 25 of 27

pbejse
Mentor
Mentor

@angelinabrown0123 wrote:

Your new lisp showing "Command: SPA1 ; error: ADS request error" error on my AutoCAD.


I guess it's one of those blocks...

Could only be this line

(setq e (ssname ss inc)
    bn (strcase  (getpropertyValue e "BlockTableRecord/Name")))

Change it to ...

(setq e (vlax-ename->vla-object  (ssname ss inc))
    bn (strcase
	 (if (vlax-property-available-p e 'effectivename)
    		(vla-get-effectivename e)
    		(vla-get-name e))))
...
(setq pts (ucs-bbox e))
...

HTH

 

Message 26 of 27

angelinabrown0123
Advocate
Advocate

@pbejse 

Thank you very much it is working fine.

Whenever you have time, update the code for plotting multiple title block in a single drawing.

 

 

0 Likes
Message 27 of 27

diagodose2009
Collaborator
Collaborator

Can you test this version?

In my aCad, thanks for RonJOnp, the code work great.

;;you only add optional MultpiBlocks
"Block=Model/Multiple/Select="

 

 

0 Likes