Jump to content

SSGET for blocks question


ziele_o2k

Recommended Posts

I whant to select dynamic blocks with some conditions:

  1. Each block scale has to be grather than 0
  2. X Y and Z scale factor has to be the same for indivdual block

I know how to get blocks with condition No.1 inside ssget, but can it be done for second one?

Example:

  • Block 1: scale factors X=1 Y=1 Z=1 (select)
  • Block 2: scale factors X=-1 Y=-1 Z=-1 (don' t select)
  • Block 2: scale factors X=2 Y=3 Z=2 (don' t select)
  • Block 3: scale factors X=4 Y=4 Z=4 (select)

To get blocks with scale grather than 0 I can use:

(ssget 
 (list 
   (cons 0 "INSERT") 
   (cons 410 "Model")
   ;(cons 2 Anonymous References of dynamic block)
   (cons -4 "<AND")
     (cons -4 ">") (cons 41 0)
     (cons -4 ">") (cons 42 0)
     (cons -4 ">") (cons 43 0)
   (cons -4 "AND>")
 )
)

Can I add condition to function above which will check if 41 42 and 43 codes are equal?

Workaround solution can be this one:

 

Workaround solution deleted

Edited by ziele_o2k
Workaround solution was wrong.
Link to comment
Share on other sites

Personaly i would use your 'workaround' to filter the selection, since the SSGET can get very confusing.

Also, i double it can handle a '=' check for multiple AND variable values...

Link to comment
Share on other sites

In your workaround you finally filter inserts based on their name and layout. The result can include inserts with faulty scaling factors.

Link to comment
Share on other sites

In your workaround you finally filter inserts based on their name and layout. The result can include inserts with faulty scaling factors.

True, my workaround is wrong, I can write another (in my case it would be great if ssget would work with ename or handle :) ).

Nevertheless this is not my question :)

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