Jump to content

Stepping through block to get Text value.


Strydaris

Recommended Posts

Hi everyone,

 

Looking for some help here with something.

What I am looking to do is to get a text or mtext value inside a block.

Issue may be that that text value could be another block nested in another block nest in another one.

All depends on how the consultants we work with decide to send them.

The other issue may be that there my be 2 text values inside the nested block, but what I want is the one that will be selected by the LISP.

 

I have moderate knowledge of LISP, but have never looked into stepping through a block to get to a nested block. Not sure where to begin with this.

 

Thanks in advance for the knowledge and help.

Stry.

Link to comment
Share on other sites

The easiest and fastest functions that you can read about, are nentsel & nentselp which should be a good way to work directly with nested objects even nested into nested.

  • Like 1
Link to comment
Share on other sites

10 hours ago, mhupp said:

Maybe just burst everything?

http://www.lee-mac.com/upgradedburst.html

 

Ah, go on, if you are quoting Lee Mac, I'll see your nested burst and raise you Copy Swap Text (CTX), (http://lee-mac.com/copytext.html)

 

RTN from this function (defun copyswaptext:getselection ( msg ini / rtn sel str tmp ) returns the selected entity name and the text value - what the inputs are can be found in the rest of the code.

 

 

 

CTX is one of my favourite functions, tried making up similar but it was never quite as good as his - well worth having in your LISP library

Edited by Steven P
  • Like 2
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...