DonovanPorter Posted September 1, 2011 Author Share Posted September 1, 2011 datum , is used to set the level eg: when you click datum , and select a point on the dwg you enter the level eg:1234000 , once the datum has been sent you click the place level (wich is pointy) then you place a level any where on your structure , and it generates the level at the point where you placed the level indicator. what i want to change is the current level indicator which it places , with another one that i received from the client what will this new code do ?? excuse my ignorance.. Quote Link to comment Share on other sites More sharing options...
BlackBox Posted September 1, 2011 Share Posted September 1, 2011 Thanks for the explanation. The code I posted does exactly the same as the code you posted, just with a few improvements (localized variables, if statements, etc.). What is it exactly that your client wants you to *do*... use their block instead of "pointy.dwg" (the block you've been inserting)? If so, then just replace "pointy" in the code I posted with their block name (assuming their block is also single attributed, there will be no issue). However, this will then make the POINTY function no longer work for your block. So the correct solution (as I see it), is to incorporate an option (during the command). For example: (defun c:POINTY ( / blkName pt s i) (princ "\rPOINTY ") (if (not *datum*) (_DATUM)) (if (and (not (initget 1 "Pointy Client")) (setq blkName (getkword "\nEnter block name [Pointy/Client]: ")) (setq pt (getpoint "\nSpecify insertion point: "))) (command "._-insert" blkName pt (getvar 'dimscale) 1. 1. (strcat (substr (setq s (rtos (+ *datum* (cadr pt)))) 1 (setq i (- (strlen s) 3))) "," (substr s (1+ i)))) (cond (blkName (prompt "\n** Point not specified ** ")) ((prompt "\n** Block name required ** ")))) (princ)) ... Where Client is the name of your client's block, which must reside within the Support File Search Paths (SFSP). Quote Link to comment Share on other sites More sharing options...
DonovanPorter Posted September 1, 2011 Author Share Posted September 1, 2011 yes our client wants us to use there level indicator which looks different to ours so , in a nut shell whe i place a leve after setting the datum i want it to use the level indicator and not ours Quote Link to comment Share on other sites More sharing options...
BlackBox Posted September 1, 2011 Share Posted September 1, 2011 Have you tried this code? What was the result (once you substituted the client's block name)? Quote Link to comment Share on other sites More sharing options...
DonovanPorter Posted September 1, 2011 Author Share Posted September 1, 2011 when i substitute it with the clients name it gave me a error with the datum. not sure why ?? what i done now was i archived our pointy for now and renamed there level indicator pointy. this works fine. what i would like to have though if the value could be underlined automatically , rather than editing the tribute with %%u every time. i did try that code you mention and it did not work. i can email you the EXTRAS lisp that i use to do this exercise with. then you can have a look at all the info you need. Quote Link to comment Share on other sites More sharing options...
DonovanPorter Posted September 1, 2011 Author Share Posted September 1, 2011 this is there style for the level indicator , id like the numbers underlined Quote Link to comment Share on other sites More sharing options...
DonovanPorter Posted September 1, 2011 Author Share Posted September 1, 2011 ok now ive had a look at both the level indicators , and i have realised they are the same in the sense that there's has there text underlined and justified to bottom right. can one make my pointy lisp ask for justification and to be underlined ? or can it me made to do it automatically ?, i really appreciate the time , and effort in explaining these steps. Quote Link to comment Share on other sites More sharing options...
BlackBox Posted September 1, 2011 Share Posted September 1, 2011 Simply revise your block to be in the format/justification you want. Then all new instances of the block will be in the correct configuration. If the code I posted for you doesn't work, then I am missing something (not sure what). Quote Link to comment Share on other sites More sharing options...
DonovanPorter Posted September 1, 2011 Author Share Posted September 1, 2011 ok i revised my block and its fine except for the underlining , how can i incorporate the underlining into the lisp Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.