Jump to content

LISP or Script to select objects using a specific Property


LaPointeDale

Recommended Posts

Hello,

 

I am currently searching for a way to automate the selection of a set of items based on a property. I have added a custom property via Plant 3D called SpecialtyItem. I want to use this property the select all objects with that property so that I can move those objects to a new Specialty Items layer. I am able to select based on this property using Quick Select but I am hoping to be able to automate this by running a script or LISP to I can build into a button for simple use. I have read over a few things regarding using ssget but it doesn't seem that I can filter based on a certain property of an item, but maybe I am just misinterpreting something. Any help would be appreciated.

Link to comment
Share on other sites

You need to find out if the property is at the top level or buried deeper, try this (entget (car (entsel "\npick object"))) paste to command line, have a look at it, see if your Specialtyitem is there.

 

Else try Dumpit.lsp also to see what properties are revealed at top level.

 

DumpIt.LSP

Edited by BIGAL
Link to comment
Share on other sites

32 minutes ago, BIGAL said:

You need to find out if the property is at the top level or buried deeper, try this (entget (car (entsel "\npick object"))) paste to command line, have a look at it, see if your Specialtyitem

When i paste that into the command line it returns this:

pick object((-1 . <Entity name: 13a2f404320>) (0 . "ACPPPIPEINLINEASSET") (5 . "4DA") (102 . "{ACAD_REACTORS") (330 . <Entity name: 13a2f404350>) (102 . "}") (330 . <Entity name: 13a2e1e91f0>) (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8 . "P3D-SPECIALTY") (100 . "AcPpDb3dPart") (90 . 66050) (90 . 0) (290 . 0) (290 . 0) (10 0.0 0.0 0.0) (100 . "AcPpDb3dInlineAsset") (340 . <Entity name: 13a2f404120>) (40 . 0.0) (10 2980.86 -1924.13 1410.0) (210 1.0 0.0 0.0) (211 0.0 0.0 1.0) (90 . 0) (100 . "AcPpDb3dPipeInlineAsset"))

 

Which has no mention of the SpecialtyItem property.

Link to comment
Share on other sites

On 2/15/2024 at 8:10 PM, BIGAL said:

You need to find out if the property is at the top level or buried deeper, try this (entget (car (entsel "\npick object"))) paste to command line, have a look at it, see if your Specialtyitem is there.

 

Else try Dumpit.lsp also to see what properties are revealed at top level.

 

DumpIt.LSP 561 B · 13 downloads

Is there a way to search for properties that arent on the top level?

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