Jump to content

Recommended Posts

Posted

Has anyone used Lee Mac's Update Title Block Routine with a wildcard in the layout column. As an example we have layouts with the following names:

 

10-101.A and 10-101.B

 

We would like the title block to be updated identically on both 10-101.A and 10-101.B.

 

I would like to update the Lisp routine to accept a wildcard so on the CSV file in the layout column I can enter 10-101*.

 

Is this possible?

Posted

Change Line 158 from:

 

(setq val (cdr (assoc (strcase (cdr (assoc 410 (entget ent)))) lst)))

 

to:

(setq lay (strcase (cdr (assoc 410 (entget ent))))
     val (vl-some (function (lambda ( x ) (if (wcmatch (car x) lay) (cdr x)))) lst)
)

 

Untested.

Posted

I tested the above code and it did not work correctly.

 

As a test I did the following:

 

Created a CSV file with a Layout Column containing 10-101

Created a Layout tab with 10-101

Ran UTB

Success

 

Created new layout tab 10-102.A

Created new layout tab 10-102.B

Changes the CSV layout column containing 10-101 to 10-102*

Ran UTB

Got false positive-"All attributed are up to date"

Posted

I had the wcmatch arguments around the wrong way:

 

(setq lay (strcase (cdr (assoc 410 (entget ent))))
     val (vl-some (function (lambda ( x ) (if (wcmatch [highlight]lay (car x)[/highlight]) (cdr x)))) lst)
)

Posted

This change worked as intended. Thanks for the update.

Posted
This change worked as intended. Thanks for the update.

 

You're welcome Cory.

  • 1 month later...
Posted

Anyone have any problems running UTB on 2013 autocad. It works fine on our 2012 versions, but on our 2013 versions it places the identical information in all the fields on all the layout tabs?

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...