Author Topic: How to get "insunits" from an existing block?  (Read 1453 times)

0 Members and 1 Guest are viewing this topic.

Peter2

  • Swamp Rat
  • Posts: 650
How to get "insunits" from an existing block?
« on: November 01, 2016, 07:41:02 AM »
Edit: Solved

I have a drawing "test.dwg", where the block "myblock" was already inserted from "myblock.dwg".
How to get "insunits" from this already existing block? Should be easy, but at the moment I don't find the way  :embarrassed:

Thanks

Peter
« Last Edit: November 01, 2016, 09:00:29 AM by Peter2 »
Peter

AutoCAD Map 3D 2023 German (so some technical terms will be badly retranslated to English)
BricsCAD V23

Peter2

  • Swamp Rat
  • Posts: 650
Re: How to get "insunits" from an existing block?
« Reply #1 on: November 01, 2016, 08:59:49 AM »
Found it - here is the way via "entlast":

Code - Auto/Visual Lisp: [Select]
  1. (vlax-get-property (vlax-ename->vla-object  (entlast)) "insunitsfactor")
Peter

AutoCAD Map 3D 2023 German (so some technical terms will be badly retranslated to English)
BricsCAD V23

ScottMC

  • Newt
  • Posts: 191
Re: How to get "insunits" from an existing block?
« Reply #2 on: February 21, 2018, 11:31:37 AM »
Found this alternate that works for me A2K..
http://www.theswamp.org/index.php?topic=27342.msg329051#msg329051

Lee Mac

  • Seagull
  • Posts: 12906
  • London, England
Re: How to get "insunits" from an existing block?
« Reply #3 on: February 21, 2018, 01:38:28 PM »
Here's another way, using Vanilla AutoLISP:
Code: [Select]
(cdr (assoc 70 (entget (cdr (assoc 330 (entget (tblobjname "block" "myblock")))))))
Reference here (see GC 1070).