Jump to content

Select objects where Lineweight is assigned??


Recommended Posts

Posted

If an object has a lineweight assigned, assoc code 370 has a value.

If it's set to ByLayer 370 does not appear.

 

Lineweight = .35
* List in AutoLISP format *((-1 . <Entity name: 25cbc28c8a0>) (0 . LINE) (330 . <Entity name: 25c196249b0>) 
(5 . 951A) (100 . AcDbEntity) (67 . 1) (410 . 1) (8 . 0) (370 . 35) (100 . AcDbLine) (10 0.0 0.0 0.0) 
(11 -2.92396 -1.74585 0.0) (210 0.0 0.0 1.0))
Variable name is ENT

 

(370 . 35)

 

The same line, Lineweight = Bylayer
* List in AutoLISP format *((-1 . <Entity name: 25cbc28c8a0>) (0 . LINE) (330 . <Entity name: 25c196249b0>) 
(5 . 951A) (100 . AcDbEntity) (67 . 1) (410 . 1) (8 . 0) (100 . AcDbLine) (10 0.0 0.0 0.0) (11 -2.92396 -1.74585 0.0) (210 0.0 0.0 1.0))
Variable name is ENT

 

370 is missing. Is it NIL?

 

How can I select all objects where 370 has a value?

 

 (setq LW (ssget "_X" '((370 . ??Has some value??)))) ;;;????

 

 

 

Posted (edited)
(setq LW (ssget "_X" '((370 . *))))

 

-Edit

 

That wouldn't work because bylayer is shown as -1 byblock as -2 but doesn't show up with entget.

image.thumb.png.c5af43fc7bdbdf79985c119a1db2eeea.png

 

Using Relational Operators with ssget

(setq LW (ssget "_X" '((-4 . ">") (370 . 0))))

 

 

Edited by mhupp
  • Like 1
Posted
13 minutes ago, mhupp said:
(ssget '((0 . "LWPOLYLINE") (-4 . ">") (370 . 0)))

@mhupp  Work as need , thanks 

Posted

For my situation this is the winner..

 

(setq LW2 (ssget "_X" '((-4 . ">") (370 . 0))))

 

 

Thank you so very much!!

Posted
1 hour ago, mhupp said:

That wouldn't work because bylayer is shown as -1 byblock as -2 but doesn't show up with entget.

@mhupp  please clear me , Where it come from? 

 

LISP DATA INSPECTOR 

 

 

 

  • Like 1
Posted

@devitg its part of blade.

 

Quote

BricsCAD LISP Advanced Development Environment (BLADE) to interactively edit and debug LISP applications. It opens in an external application window, allowing it to remain open while you work on your drawings in BricsCAD. You can move and resize it with standard application window controls.

 

  • Like 1
Posted

LineWeights : Default & ByBlock have minus values so they won't be selected with your proposal bigger than zero.

Posted

In addition to what @mhupp suggested, here is a variation to work with Default & ByBlock as well.

(setq LW (ssget "_X" '((-4 . "<OR") (370 . -2) (370 . -3) (-4 . "<AND")(-4 . ">") (370 . 0) (-4 . "AND>") (-4 . "OR>"))))

 

  • Like 1

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