Jump to content

Multiple Attribute change


Recommended Posts

  • Replies 41
  • Created
  • Last Reply

Top Posters In This Topic

  • ReMark

    10

  • Lee Mac

    10

  • Bennymac777

    9

  • dbroada

    4

If he ran LISP on LT then he went out overnite and bought an extender program. No way he ran LISP in LT and got even partial results. Right?

Link to comment
Share on other sites

If he ran LISP on LT then he went out overnite and bought an extender program. No way he ran LISP in LT and got even partial results. Right?

 

Not a chance. :wink:

Link to comment
Share on other sites

I think Lee is becoming a more powerful programmer than we gave him credit for. He can now write LISPs that run on LT machines!!! :shock:

Link to comment
Share on other sites

All hail the great and powerful LEE! :lol:

 

Expect a call from AutoDesk. I think you have a new career Lee.

 

Haha, you flatter me too much guys :)

Link to comment
Share on other sites

I was not able to run the LISP on the full version because I did not know that command to start it. Now I know the command so I am going to try it.

 

My question that I last stated was about the script. When I ran the script on the full version of AC2006 if found 74 attributes and therefore I was able to run it. But on LT2009 I ran the same exact script and it only found 31 attributes and therefore I was not able to run it.

 

My question is...Is there a system variable that I am missing.

 

-attedit

N

N

*

*

*

(Enter String to edit)

(Enter New String)

 

That is the script that I am using

Link to comment
Share on other sites

No system variable is referenced in the script. Only the command -attedit is invoked.

 

I cannot explain why in LT the script only found 31 attributes and not the 74 you mention. I was under the impression there was only a single string that had to be found and changed and that there was only one instance of this string per drawing. The script is global so it will report back the total number of attributes found but change only the specific attribute addressed. Example: I could have a block (with attributes) called LocalInstrument. I may have 76 of these blocks inserted in the drawing. But if I say to change the specific string 2LS001 to 4LS999 and there is only one block with that value then 75 blocks do not get changed.

Link to comment
Share on other sites

Yeah I tried it on my computer with LT and did not have any luck. I tried figuring it out for about a hour. Then I went over to a different computer and it worked the first time in the full version. I was shocked because it was the same exact commands. It boggles my mind.

Link to comment
Share on other sites

I tested the script on a computer running full 2009. I don't have immediate access to LT. I'll have to look around. I think one of the engineers has LT 2004.

Link to comment
Share on other sites

Lee Mac...I would just like to thank you. I don't understand how the hell you wrote that program but thank you it worked!!!!!! Thank you to everyone else too!

Link to comment
Share on other sites

Lee Mac...I would just like to thank you. I don't understand how the hell you wrote that program but thank you it worked!!!!!! Thank you to everyone else too!

 

Yayyy! ObjectDBX is a temperamental thing, cause the coding changes from version to version - but I'm really glad it worked :)

 

We're going to miss Lee when he gets a girlfriend. They'll be no time for CT.

 

Hahahaha :lol:

Link to comment
Share on other sites

  • 1 month later...

I've been trying to do some custom tools that work with block attributes. Is your block in the same exact location and scale on every drawing? If it is, you could try doing a window selection to pick the attribute. When asked to select the attribute, use "W" and then 2 pairs of coordinates. This is pretty crude, but it might work.

Link to comment
Share on other sites

  • 1 month later...

Sorry to wake up this thread. I was just using the code Lee posted in post #10 (which is awesome by the way) and am wondering if anyone else has had a problem with one thing:

When I go into a drawing that has had attributes modified, there are some attributes that have slightly shifted! To top off the strange occurrence, as soon as you edit and ok one of those attributes that have slightly moved the attribute immediately moves back to it's correct position. What could it be???

 

I'm thinking it's an ObjectDBX thing because there is nothing in Lee's code to make an attribute move.

 

Such a small problem but it's ruining the use of this great program!

Link to comment
Share on other sites

  • 2 weeks later...

Lee, just wanted to let you know that the script doesn't work on dynamic blocks that are not in their original (reset) state, when you use the dynamic functions of a block it gets an anonymous name assigned to it on top of the original block name and the script doesn't select those blocks.

 

Ps: You don't have to change it, i have no use for the script, just tested it for fun :).

Link to comment
Share on other sites

(because Lee may not reply) I imagine that is because of the moment you change a dynamic block it changes the block name, which is what this lisp uses to search the drawing.

 

ps. if you feel like testing stuff can you try this out? :wink: It is Lee's lisp but using select instead of typing in block names (cause sometimes I can't remember the block names and attributes) plus with the problem I mentioned in post #35 & 36 half sorted out.

GATTE3 - Change Attribute over multiple drawings.lsp

Link to comment
Share on other sites

(because Lee may not reply) I imagine that is because of the moment you change a dynamic block it changes the block name, which is what this lisp uses to search the drawing.

 

ps. if you feel like testing stuff can you try this out? :wink: It is Lee's lisp but using select instead of typing in block names (cause sometimes I can't remember the block names and attributes) plus with the problem I mentioned in post #35 & 36 half sorted out.

If you look in the Dynamic Block Visibility Change routine I posted, it maps out how to get dynamic blocks before and after they've gone through the name change.

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