Jump to content

Many times I recommended to my BOSS to purchase...


cadamrao

Recommended Posts

Hi Friends!

 

Many times I recommended to my BOSS to purchase at least AutoCAD 2009; simply he smiling, but I’m facing problem to FIND & ZOOM the TEXT string from XREF (drawing file); XREF already BLOCK and attached with drawing. I need to match the TEXT string from XREF to drawing; so that I want to FIND & ZOOM the TEXT string from XREF. How to solve my problem in AutoCAD 2008? Anybody can help LISP! For this help will be greatly appreciated Thanks Amr

Link to comment
Share on other sites

My BFind program still has a few bugs to iron out, so I removed it from the forum until these are solved - however, a 'beta' version if you will, is posted here - its still not perfect, but will work 99% of the time I would think.

 

Lee

Link to comment
Share on other sites

It's not work 99%;just I need to FIND&ZOOM,no need to replace the TEXT,MTEXT

 

That doesn't mean the program doesn't work - it means it doesn't suit your requirement. :glare:

Link to comment
Share on other sites

Hi

 

Still I didn’t get; anybody try this!

Many times I recommended to my BOSS to purchase at least AutoCAD 2009; simply he smiling, but I’m facing problem to FIND & ZOOM the TEXT string from XREF (drawing file); XREF already BLOCK and attached with drawing. I need to match the TEXT string from XREF to drawing; so that I want to FIND & ZOOM the TEXT string from XREF. How to solve my problem in AutoCAD 2008? Anybody can help LISP!

 

Just I need to FIND&ZOOM, no need to replace the TEXT, MTEXT

ThanksAmr

Link to comment
Share on other sites

Why don't you try it?

 

Oh, and I don't appreciate receiving personal messages requesting that I create your program - my time is voluntary, and I am in no way participating on this forum to serve your needs.

Link to comment
Share on other sites

Cadamrao, I have merged your two threads. Please don't start multiple threads asking the same question.

 

 

ok;thanks!

Link to comment
Share on other sites

Why don't you try it?

 

Oh, and I don't appreciate receiving personal messages requesting that I create your program - my time is voluntary, and I am in no way participating on this forum to serve your needs.

 

 

ok;noted

 

Thanks

Link to comment
Share on other sites

So, just off the top of my head (coming from a guy who doesn't know LiSP very well), if I am understanding this correctly, Cadamrao needs to (writing suedo code)

A Select a text string on an xref

B Have the lisp search the current drawing for that string

C IF the string is found THEN

D center on that string and zoom into it

E ELSE tell the user there isn't a string available.

 

If that is correct, the biggest hurdle I would have would be selecting the string from the xref.

After the string is assigned to a variable, you could search by

(setq i -1)
(setq SearchStrings (ssget "_X" '((0 . "TEXT,MTEXT"))))
(while (setq Str2Search (ssname SearchStrings (setq i (1+ i))))
...  etc.

I would assume you would use WCMATCH to match the string being search with the variable of the string from the xref.

If WCMATCH returns T (true)

Then ... get the coordinates of the Str2Search variable for VIEWCTR.

setvar VIEWCTR to those coordiates and there it is in the middle of the screen.

 

I'm just brainstorming here, I think it's good practice. You all can comment on my thought process and how far off the mark I am. :)

Link to comment
Share on other sites

You cannot use ssget to search for entities nested within entities, you would need to look through the block definition as found in the block table - that is unless I have also misunderstood the request. If you are just searching the drawing file, then ssget will suffice.

 

Selecting the text from the xref would make use of nentsel to force a nested selection.

Link to comment
Share on other sites

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...