CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products [www.cadforum.cz] ARKANCE | CONTACT - CZ | SK | EN | DE
Over 1.096.000 registered users (EN+CZ). AutoCAD tips, Inventor tips, Revit tips. Try the new precise Engineering calculator and the updated Barcode generator. New AutoCAD 2026 commands and variables.
Plex.Earth connects AutoCAD and Google Earth
RSS channel - CAD tips RSS tips
RSS discussions

Discussion Discussion forum

?
CAD discussions, advices, exchange of experience

CAD Forum - Homepage CAD discussion forum - ask any CAD-related questions here, share your CAD knowledge on AutoCAD, Inventor, Revit and other Autodesk software with your peers from all over the world. To start a new topic, choose an appropriate forum.

Please abide by the rules of this forum.
This is a peer-to-peer forum. The forum doesn't replace the official direct technical support provided by ARKANCE for its customers.
How to post questions: register or login, go to the specific forum and click the NEW TOPIC button.
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Topic ClosedHi, help pls, how to extract. with Lisp, the NAME

 Post Reply Post Reply
Author
dukeNukem View Drop Down
Newbie
Newbie


Joined: 03.Jul.2023
Location: Costa Rica
Using: Autocad 2006
Status: Offline
Points: 2
Direct Link To This Post Topic: Hi, help pls, how to extract. with Lisp, the NAME
    Posted: 03.Jul.2023 at 03:32

Hi, help pls, how to extract. with Lisp, the NAME of the file of an XREF, but that is inside another XREF
For example, the main XREF, the one displayed on the screen, is called ONE, but within the ONE file, there was already an XREF, within ONE, called TWO.
I need to extract that Xref name (TWO) to a variable.
Please.
And thanks a lot for the help guys !!!!

Back to Top
Kent Cooper View Drop Down
Senior Member
Senior Member


Joined: 12.Mar.2013
Location: United States
Using: AutoCAD2020, 2023
Status: Offline
Points: 686
Direct Link To This Post Posted: 03.Jul.2023 at 19:37
By what method?  If you mean to select the nested Xref, and if you can select it on something that is not a complex object [such as a Dimension or a further-nested element], then this should do it:

(cdr (assoc 2 (entget (car (last (nentsel "\nSelect basic object at top level in nested Xref: "))))))

The return from (nentsel) for a nested object ends with a list of what it's nested in, starting with the deepest-nested one and stepping up from there.  So if [for example] you pick on a part of a Block in that Xref, you'll get the file name and Block name in "TWO|test" form, not just the Xref drawing file name -- maybe that would serve your purpose.  But if you pick on a Dimension, you'll get something like "*D|REF6", which presumably would not.


Edited by Kent Cooper - 03.Jul.2023 at 19:44
Back to Top

Related CAD tips:


 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down



This page was generated in 0,058 seconds.