Author Topic: Xref Setting  (Read 1210 times)

0 Members and 1 Guest are viewing this topic.

mohan

  • Newt
  • Posts: 98
Xref Setting
« on: February 12, 2022, 10:02:25 AM »
Look for the Xref name: "Drawing-Frame" If it is found detach it / if not found leave.
Code: [Select]
(if (search for the Xref name "Drawing-Frame")
(command "_-xref" "detach" "Drawing-Frame" ) (princ "\n--> No any Xref name found on - Drawing-Frame."))

Look for the Xref name: "Proposed_Building_Plan" If it is not found insert it / if it is found leave.
Code: [Select]
(if [color=blue](not [/color](search for the Xref name "Proposed_Building_Plan")[color=blue])[/color]
(command "_-xref" "overlay" "D:\\Proposed_Building_Plan.dwg" "0,0,0" "" "" "") (princ "\n--> The Xref name Proposed_Building_Plan is already inserted."))

How to search for the Xref
Note: I correct in blue
« Last Edit: February 18, 2022, 08:35:26 AM by mohan »
"Save Energy"

CincyJeff

  • Newt
  • Posts: 89
Re: Xref Setting
« Reply #1 on: February 14, 2022, 12:38:01 PM »
(tblobjname "block" "Drawing-Frame")

mohan

  • Newt
  • Posts: 98
Re: Xref Setting
« Reply #2 on: February 18, 2022, 08:35:00 AM »
(tblobjname "block" "Drawing-Frame")

Thanks brother . . .  :smitten:
"Save Energy"