Jump to content

Attach multiple XREFs in a grid according to filename


inverso

Recommended Posts

Hello,

 

I don't even know if automizing this kind of sequence is possible but I figured it's worth a shot.

 

Right now I got around 600 xrefs to attach to a single file and their names corelate to the position I want them in a drawing. For example I got filenames like "100, 101, 102, 103, 110, 111, 300, 301, 500, 501, 600" and I want them import all of them at once and set them so that whenever first number changes, it begins a new column of attached drawings:

  • drawings 100, 101, 102, 103, 110, 111 would one under another in first column,
  • drawings 300, 301 would be in second column
  • etc.

Is it even possible to create a lisp that would do that?

 

Thank you in advance!

Link to comment
Share on other sites

Its doable as you check name as say a number not a string, so can work out via a Cond which column to use. Just thinking do COND backwards.

 

(cond
((> dgwnum 1100)(setq num 11))
((> dgwnum 1000)(setq num 10))
((> dgwnum 900)(setq num 9))
..........
((> dgwnum 100)(setq num 1))
((< dgwnum 100)(setq num 0))
)

 

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