Jump to content

Using a text file to add and manipulate Dynamic Blocks


deejaydave

Recommended Posts

What I am saying is run full code and if it errors then post all the commands so we can see error message.

 

 

Any else one out there tried it ? Its a smart dynamic block, we may have a use for something similar.

Link to comment
Share on other sites

  • Replies 22
  • Created
  • Last Reply

Top Posters In This Topic

  • deejaydave

    12

  • BIGAL

    10

  • harshad

    1

I have managed to get it to work. I edited the 1st lot of code you sent, I deleted the following lines:

(setq fname (open "P:\\Autodesk\\lisp\\civilcad6layercodes.txt" "r"))

and

(foreach att (vlax-invoke obj 'getattributes)

(if (= "ANGLE" (strcase (vla-get-tagstring att)))

(vla-put-textstring att ang)

)

)

I then saved the file as a new name, ran it and it worked.

The original angle was the “Dip Direction”, which affects the rotation of the block, I have now been asked to add the “Dip Angle”, which has no effect on the block, it just adds a text box with the angle, my question is this “Would I be able to add this new element to the code, based on what is already there?”.

 

 

 

I would like to than you for all the help you have given me, I think I need to learn a little more about lisp.

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