See the top rated post in this thread. Click here

Page 3 of 3 FirstFirst 123
Results 21 to 28 of 28

Thread: writing a LISP to automate daily practice

  1. #21
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL USA
    Posts
    3,658
    Login to Give a bone
    0

    Default Re: writing a LISP to automate daily practice

    Quote Originally Posted by majou789377 View Post
    can you please explain more about the part of redefining the block?, it didn't seem to work for me
    Easy way is to simply start with a template with the block already defined how you want it.
    Inserting the surveyor's drawing will display the blocks as they were set up in the template not how they were defined in the surveyor's drawing. No redefining necessary.

  2. #22
    Member
    Join Date
    2020-04
    Posts
    11
    Login to Give a bone
    0

    Default Re: writing a LISP to automate daily practice

    Quote Originally Posted by Opie View Post
    I concur with Tom on the Student Version drawings. However, you can still automate a lot of these steps.

    I would first create the template drawing containing this CROSS block used by your surveyor. In that template, modify the CROSS block to fit your desired output. I would add three ATTRIBUTE DEFINITIONS to the block with each mimicking the text provided by the surveyor in your desired height and the layer the text is currently on. For the HEIGHT attribute, I would add a block placeholder for the Z coordinate with the appropriate precision. For the CO_ORD attribute, I would do the same for the X and Y coordinates with similar precision. Once you have that you can continue to the automation.

    Using your template, INSERT and EXPLODE your surveyor's drawing. This will make your CROSS block take precedence over the surveyor's block. All of the surveyor's CROSS blocks will be rewritten to match your CROSS block definition. You would then use the ATTSYNC command to update the location labels for the block.
    managed to do this. the rest didn't work. I copied the LISP you wrote and have the following message :
    Command: EASYBUTTON
    ; error: no function definition: PUTBLKATTRIB

  3. #23
    Member
    Join Date
    2020-04
    Posts
    11
    Login to Give a bone
    0

    Default Re: writing a LISP to automate daily practice

    Quote Originally Posted by Tom Beauford View Post
    Easy way is to simply start with a template with the block already defined how you want it.
    Inserting the surveyor's drawing will display the blocks as they were set up in the template not how they were defined in the surveyor's drawing. No redefining necessary.
    the way I see is it can be done directly. I can just edit the current cross block that I get from surveyor by adding attribute of Z value as Opie explained.

  4. #24
    Administrator Opie's Avatar
    Join Date
    2002-01
    Location
    jUSt Here (a lot)
    Posts
    9,096
    Login to Give a bone
    2

    Default Re: writing a LISP to automate daily practice

    Quote Originally Posted by majou789377 View Post
    the way I see is it can be done directly. I can just edit the current cross block that I get from surveyor by adding attribute of Z value as Opie explained.
    How often do you want to make THAT edit of the block? You started this thread complaining about all the steps you currently have to do manually.

    What we are suggesting is you create a new drawing with the modified block to your desired appearance. You can even use the initial drawing from the surveyor and delete all object placed in the drawing. Once this drawing is saved as a template, create a new drawing based off of this template. Then, when you get a new drawing from the surveyor, insert the surveyor's drawing into the new drawing you created from the template.
    If you have a technical question, please find the appropriate forum and ask it there.
    You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
    jUSt

  5. #25
    Administrator Opie's Avatar
    Join Date
    2002-01
    Location
    jUSt Here (a lot)
    Posts
    9,096
    Login to Give a bone
    0

    Default Re: writing a LISP to automate daily practice

    Quote Originally Posted by majou789377 View Post
    managed to do this. the rest didn't work. I copied the LISP you wrote and have the following message :
    Command: EASYBUTTON
    ; error: no function definition: PUTBLKATTRIB
    I posted a link to the post that contains that function definition. I did not include it in my code.

    Anyway, the code I posted was untested. Since then, I have tested my posted code. It doesn't completely work. Parts of it does, though. You can work through portions of it to see what does work and what doesn't. Maybe someone can help determine a solution to fix the code portions that do not work. Unfortunately, I am down on manpower at work and am unable to continue to help.
    If you have a technical question, please find the appropriate forum and ask it there.
    You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
    jUSt

  6. #26
    All AUGI, all the time
    Join Date
    2003-07
    Posts
    555
    Login to Give a bone
    1

    Default Re: writing a LISP to automate daily practice

    Like Tom using block "cross" find the text next to it and replace all with new block with attributes, its a common task, post a dwg, if the E N are the block insert point that helps as only need to look for 1 text top left.

  7. #27
    Administrator Opie's Avatar
    Join Date
    2002-01
    Location
    jUSt Here (a lot)
    Posts
    9,096
    Login to Give a bone
    0

    Default Re: writing a LISP to automate daily practice

    Quote Originally Posted by BIG-AL View Post
    Like Tom using block "cross" find the text next to it and replace all with new block with attributes, its a common task, post a dwg, if the E N are the block insert point that helps as only need to look for 1 text top left.
    The "cross" block is currently just a "+". However, the drawing displays the x & y coordinates in one text object, the z in another text object, and then an ID is displayed in another text object. Fortunately, the "cross" block is inserted with the correct coordinates. This helps with the redefinition of the block to include attributes displaying those coordinates. The only sticking point is getting the ID into an attribute. Part of my code will do that and was functioning. Later code was not as I was writing it without access for testing.
    If you have a technical question, please find the appropriate forum and ask it there.
    You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
    jUSt

  8. #28
    Member
    Join Date
    2020-04
    Posts
    11
    Login to Give a bone
    0

    Default Re: writing a LISP to automate daily practice

    Quote Originally Posted by Opie View Post
    How often do you want to make THAT edit of the block? You started this thread complaining about all the steps you currently have to do manually.

    What we are suggesting is you create a new drawing with the modified block to your desired appearance. You can even use the initial drawing from the surveyor and delete all object placed in the drawing. Once this drawing is saved as a template, create a new drawing based off of this template. Then, when you get a new drawing from the surveyor, insert the surveyor's drawing into the new drawing you created from the template.
    indeed that is the point. editing the current drawing and save it as template.

    - - - Updated - - -

    Quote Originally Posted by Opie View Post
    I posted a link to the post that contains that function definition. I did not include it in my code.

    Anyway, the code I posted was untested. Since then, I have tested my posted code. It doesn't completely work. Parts of it does, though. You can work through portions of it to see what does work and what doesn't. Maybe someone can help determine a solution to fix the code portions that do not work. Unfortunately, I am down on manpower at work and am unable to continue to help.
    you had been a great help already thank you so much for your time and contribution.

Page 3 of 3 FirstFirst 123

Similar Threads

  1. daily occurrence --> ADT2005 "re-install"
    By markjnstne in forum CAD Management - General
    Replies: 2
    Last Post: 2004-08-06, 04:03 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •