Author Topic: select objects added from time of opening  (Read 3946 times)

0 Members and 1 Guest are viewing this topic.

daron

  • Guest
select objects added from time of opening
« on: March 17, 2004, 04:54:10 PM »
I've got some drawings that have redlines on them and from one drawing to the next, they are the same revisions. Is it possible to get a selectionset of all added objects, since the drawing was opened?

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
select objects added from time of opening
« Reply #1 on: March 17, 2004, 10:24:08 PM »
Well, I would think so......
Try this ....
upon opening the drawing grab this...
Code: [Select]

(setq startentity (entlast))

Then before ending ....
Code: [Select]

(setq sset (ssadd))
(setq nextent (entnext startentity))
(while (/= nil nextent)
 (setq sset (ssadd nextent sset))
 (setq nextent (entnext nextent))
)

Of course this code will only work during the current drawing session...I have an idea for a persistent entity addition tracker....
Something like ....
Code: [Select]

(setq objhandle (handent (setq startentity(entlast))))
(setq fn (open (strcat (getvar "dwgname") ".trk") "a"))
(if fn
 (write-line objhandle fn)
 (close fn)
)
(setq sset (ssadd))
(setq nextent (entnext startentity))
(while (/= nil nextent)
 (setq sset (ssadd nextent sset))
 (setq nextent (entnext nextent))
)


I haven't completely thought out the program flow for the selection of entities from a specific start point in the drawing... but I imagine the psudo code as follows....
Code: [Select]

open drawing
grab last entity in database extract persistent handle
write handle to tracking file (or perhaps a drawing dictionary or ldata)
when user requests all entities added
open tracking file (or dictionary or ldata)
grab last handle
grab entity with matching handle
cycle through all entities that follow
put each entity in a selection set

For multiple sessions, perhaps a dialog with a date listed that the user can select to start grabbing entities from. A "begin from" point

There are some considerations for example if the last entity was erased at any time, the program would likely fail unless it was designed to grab the next handle designation by default.
We would need to figure out a way to properly increment the handle to the next graphical entity because handles are also assigned to non graphical entities.

This is food for thought though...
Cool idea...
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
select objects added from time of opening
« Reply #2 on: March 17, 2004, 10:55:02 PM »
Quote
they are the same revisions. Is it possible to get a selectionset of all added objects, since the drawing was opened?


You have two drawing files, right?
In this case could you compare the entity lists from the two drawings.

In the future could you save the entire entity list or create a back up file
to compare the entity list from the current session?

Just thinking out loud here.

CAB
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

daron

  • Guest
select objects added from time of opening
« Reply #3 on: March 18, 2004, 08:02:42 AM »
I could look into it CAB, but even though the revisions are the same, the drawings in their entirety aren't.

Keith, both of those ideas are cool. I wonder if a combination of ideas would be good? How about make a selection set of all entity handles at the opening of a drawing, then take them again at a command point (point at which the user will want to copy the new data) of the drawing, compare and remove all like handles from the list and place each new element in the selectionset. Thanks for the ideas. This'll be cool.

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
select objects added from time of opening
« Reply #4 on: March 18, 2004, 02:00:03 PM »
Well, since handles are completely unique in the drawing, IF you open a drawing and extract the last entity handle, then save that drawing as a different name, and reopen the original drawing, make a few changes, you will have duplicated handles between the two files, but the indenticalness in handles will remain up to the point at which you saved the second version.

Does this make sense?
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

daron

  • Guest
select objects added from time of opening
« Reply #5 on: March 18, 2004, 02:29:28 PM »
I think so. We did an experiment at AU where the instructor was talking about appending info to handles and extracting it when you print. Long story. Anyway, we wanted to make sure that the handles would remain if you blocked it out. We found out that it got assigned a new handle. Anyway, all I was thinking was per session. If I can create a selectionset of said entities, then I can copy them to the clipboard and paste them.

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
select objects added from time of opening
« Reply #6 on: March 18, 2004, 02:44:56 PM »
Yes you can....
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie