Jump to content

help with extracting text from one dimension....


leonucadomi

Recommended Posts

And another that allows a pick of any part of the dimension :)

(defun c:foo (/ e el m p1 p2)
  (if
    (and
      (setq e (car (entsel "\nPick dimension: ")))
      (progn (vlax-for a (vla-item (vla-get-blocks (vla-get-activedocument (vlax-get-acad-object)))
				   (cdr (assoc 2 (entget e)))
			 )
	       (and (= "AcDbMText" (vla-get-objectname a)) (setq m (vlax-vla-object->ename a)))
	     )
	     m
      )
      (setq p1 (cdr (assoc 10 (setq el (entget m)))))
      (setq p2 (getpoint p1 "\nSpecify second point: "))
    )
     (entmakex (append (vl-remove-if '(lambda (x) (= 330 (car x))) el) (list (cons 10 p2))))
  )
  (princ)
)

 

  • Like 3
Link to comment
Share on other sites

  • 1 year later...

[XDrx-PlugIn(136)] Extract dimension text (theswamp.org)

https://www.theswamp.org/index.php?topic=59438.0

 

 

(defun c:tt (/ e ms mat ents basepoint)
  (if (and (setq e (xdrx-nentselex
		     (xdrx-string-multilanguage
		       "\n拾取标注文本<退出>:"
		       "\nPick Dimension Text<Exit>:"
		     )
		     '((0 . "*text"))
		   )
	   )
	   (xdrx-object-iskindof (car (last e)) "dimension*")
      )
    (progn
      (setq ms	      (xdrx-get-currentspace)
	    mat	      (xdrx-matrix-identity 3)
	    ents      (xdrx-object-deepclone ms (car e) mat)
	    basepoint (xd::geom:get9pt (xdrx_entity_box ents) 5)
      )
      (xd::drag:freemove ents basepoint (+ 1 4 128) 547 t)
    )
  )
  (princ)
)

Link to comment
Share on other sites

36 minutes ago, Steven P said:

I don't suppose you can post the (xrdx..... commands?

@Steven P His "xdrx" command are actually a whole library written in ObjectARX. He should be including the link to his Github for it: https://github.com/xdcad/XDrx-API. It's not open source however, but it's free. Think of it like McNeel's DOSLIB, but much bigger. He is basically trying to open up a big chunk of the ObjectARX API to Visual LISP.

 

Even though I applaud his efforts, I personally won't use it yet:

1) I don't trust any new thing like this, if not open source, and not well known, tested and established in the community like DOSLIB. Perhaps as things move on and more give it approval, I will try it out.

2) I don't like being dependant on a 3rd party add-on (even DOSLIB), and prefer to find out how I can accomplish it myself.

Edited by pkenewell
  • Like 1
Link to comment
Share on other sites

There are a few people going down this path, making ARX function library, I know of another to do with Excel functions. Yes have tested them, but still use lisp.

 

Another is a poster pushing python code again need a runtime. 

 

I stay away from 3rd party add ons like DOSLIB have enough problems with clients just running lisps, without adding an extra load that they struggle to do. Look at LT2024 no DOSLIB.

Edited by BIGAL
  • Agree 2
Link to comment
Share on other sites

On 4/9/2024 at 11:28 PM, Steven P said:

I don't suppose you can post the (xrdx..... commands?

 

Like opendcl, they don't provide what Autodesk should do, but they don't provide it. This is where they succeed, maintaining the prosperous ecosystem of Autodesk.

 

Some of the people who come here can write LISP themselves to help others, and some come to ask for programs to solve their own work problems.

 

XDRX-API just gives everyone one more choice

 

As pkenewell friends said, XDRX API encapsulates the vast majority of ObjectARX SDKs, such as acdb, acge geometry library, acbr, etc., providing many functions that LISP cannot solve. Even if LISP can do it, the API is committed to being more efficient.

 

Those who can solve problems and are efficient are the best choices.

Edited by XDSoft
Link to comment
Share on other sites

On 4/9/2024 at 11:49 PM, pkenewell said:

@Steven P His "xdrx" command are actually a whole library written in ObjectARX. He should be including the link to his Github for it: https://github.com/xdcad/XDrx-API. It's not open source however, but it's free. Think of it like McNeel's DOSLIB, but much bigger. He is basically trying to open up a big chunk of the ObjectARX API to Visual LISP.

 

Even though I applaud his efforts, I personally won't use it yet:

1) I don't trust any new thing like this, if not open source, and not well known, tested and established in the community like DOSLIB. Perhaps as things move on and more give it approval, I will try it out.

2) I don't like being dependant on a 3rd party add-on (even DOSLIB), and prefer to find out how I can accomplish it myself.

 

Thank you, I will add a link to GITHUB in the post in the future


In the past, the link to theswamp.org was added because the original posts were posted there, and there is complete information there, including the GITHUB link to the XDRX API.

 

I was not familiar with the usage of this forum before, but now I am gradually getting better

Edited by XDSoft
Link to comment
Share on other sites

Make a doc file etc with a description of all the options. You can probably save in downloads and refer to it there. Maybe ask Admin.

 

image.thumb.png.95bc6a33e4cda658358c8c1c6184a809.png

Link to comment
Share on other sites

On 4/13/2024 at 3:18 AM, XDSoft said:

Thank you, I will add a link to GITHUB in the post in the future

I recommend that you also provide instructions on your GITHUB on how to download and install the ObjectARX Library properly. Maybe also start a "releases" section?

Link to comment
Share on other sites

35 minutes ago, pkenewell said:

I recommend that you also provide instructions on your GITHUB on how to download and install the ObjectARX Library properly. Maybe also start a "releases" section?

 

Thanks,
English is not my native language, so I’m not quite sure what you mean.


1.Can’t you download the 5 compressed files on github?

https://github.com/xdcad/XDrx-API
There is only one exe file in the compressed file. Double-click it to install it.

 

2. What do you mean, let me clearly state that you can click the exe file to install it?

Edited by XDSoft
Link to comment
Share on other sites

2 minutes ago, XDSoft said:

Can’t you download the 5 compressed files on github?

Allot of people haven't worked with .rar files before, including myself. I had no idea that you could combine the 5 .rar files into 1 .exe file.

Don't assume people know things that they may not know.

Link to comment
Share on other sites

53 minutes ago, pkenewell said:

Allot of people haven't worked with .rar files before, including myself. I had no idea that you could combine the 5 .rar files into 1 .exe file.

Don't assume people know things that they may not know.

 

Oh, you're right
Install WINRAR decompression software
Then right-click on the downloaded RAR, find Unzip in the menu WINRAR, and copy it to the hard drive.
Then double-click the exe file to install

  • Like 1
Link to comment
Share on other sites

I'll add in another problem that our IT has 'locked down' software, I am not sure we have the software now to open RAR files? External exe files.... not going to happen!

  • Agree 1
Link to comment
Share on other sites

2 hours ago, Steven P said:

I'll add in another problem that our IT has 'locked down' software, I am not sure we have the software now to open RAR files? External exe files.... not going to happen!

 

RAR compression is the most common compression format nowadays.

1.Don’t you use the RAR format for file packaging in your office computers?

 

2.Is there any WINRAR that decompresses RAR installed on your office computers?

 

3.If you are interested in the API, you can download it from github ( https://github.com/xdcad/XDrx-API ) and try to install it. If you encounter any problems, you can post and I will try my best to help you.

Link to comment
Share on other sites

@XDSoft First, I think what Steven P was attempting to explain, is that he cannot install or run the .exe file regardless of whether it was compressed using WINRAR or something else.

 

Secondly, Our office currently and every other office I have worked for uses ZIP compression, which Windows has available natively without need for additional software.

  • Like 1
Link to comment
Share on other sites

That's right, we have ZIP but not a lot else, exe files.

 

Installing software is not allowed generally, the software needs to be assessed, licensing looked at, clashes and conflicts with other license agreements and so on. Not like olden times when we could do a lot more

Link to comment
Share on other sites

On 4/10/2024 at 7:36 AM, BIGAL said:

There are a few people going down this path, making ARX function library, I know of another to do with Excel functions. Yes have tested them, but still use lisp.

 

Another is a poster pushing python code again need a runtime. 

 

I stay away from 3rd party add ons like DOSLIB have enough problems with clients just running lisps, without adding an extra load that they struggle to do. Look at LT2024 no DOSLIB.

 

LOL, mine is all open source, you can compile it yourself

Also, I try not to spam the lisp forums (much)

 

I’m just adding things that you absolutely cannot do from lisp. access Shapely, Pandas, OpenXLSX, and thousands of other modules

 

DOSLIB and OpenDCL are amazing, these guys put a lot of hard work into giving the community free, and cool stuff  

Edited by Danielm103
Link to comment
Share on other sites

9 hours ago, pkenewell said:

@XDSoft First, I think what Steven P was attempting to explain, is that he cannot install or run the .exe file regardless of whether it was compressed using WINRAR or something else.

 

Secondly, Our office currently and every other office I have worked for uses ZIP compression, which Windows has available natively without need for additional software.

 

You can change it to ZIP format.
However, the contents inside the compressed file are still EXE after decompression.

 

1.EXE installation is inconvenient, can msi be used?

 

2.Is it not related to the file format, but the company restricts the installation of any software?

Link to comment
Share on other sites

Pretty much the only software is the ones on their list, one off installs aren't allowed

  • Like 1
Link to comment
Share on other sites

Pretty much the same here and most other companies.

 

I have lots of convincing to do to get free apps from the Autodesk store, something from anonymous non opensource  isn't going to happen. Sometimes Windows will flag the msi files and IT will have to research the source, so can take a while.

 

AFAIK, the issue with things like DOSLIB, OpenDCL, etc. everyone using the codes needs them installed.

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