Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/18/2021 in all areas

  1. Considering the problems that you are experiencing, maybe it would be simpler to create a new linetype. *HIDDENX20,Hidden (20x) ______ ______ ______ ______ A, 127, -63.5 I always prefer to work with the global linetype scale.
    1 point
  2. I dont do a lot in 3d but you probably need to look at how you would make a gear, you will need to make 1 tooth work out the pitch, array then union them all. Others will jump in I am sure. Ps need to look at your gear tooth as the inside and outside lengths are different the matching gear has the same pattern. A tricky shape. The red lines are the bottom the green the top of the tooth. Beyond my average 3d stuff. Cutter
    1 point
  3. i think i may have confused everyone.. apologies. i'm still getting my head around how all this stuff works properly the ltscale or linetype scale factor (the global one) needs to be 1 the linetype scale of the line needs to be 20 i think i was getting these things mixed up previously. celtscale is currently set to 20
    1 point
  4. THIS ^^^^ but it only gives you 20 if LTSCALE is 1 since CELTSCALE is relative to LTSCALE. Ain't that a confusing kettle of marbles. That's why I resort to object properties for single occurrence cases, for instance when two hidden lines near each other need to be visually different but on the same layer.
    1 point
  5. I suspect that you are somehow drawing everything with the CELTSCALE set at 20, rather than with a global LTSCALE set to 20.
    1 point
  6. Pretty sure you are right. The OP's profile says they are using 2010 which would still drop selections that were panned off screen and other silly stuff. I just wanted to eliminate that since the initial description was a little vague, at least for my old retired brain. If they want data to sit around for a while and be added to, then yes, they probably need a way to permanently save the selection set, and append to it or replace it at will. That is out of my league since I retired from 23 years of writing code before I ever heard of LISP. (Just in time )
    1 point
  7. Hi @xmarcs and welcome to CADTutor - I'm delighted that you could fine my code (and this thread) useful. In response to the point you raise regarding attributed blocks: The reason that the code will presently only operate on attributed blocks is due to the presence of DXF group 66 in the ssget filter list; an entry of (66 . 1) in the DXF data of an INSERT entity indicates that ATTRIB entities follow the INSERT in the drawing database, i.e. the block is attributed. For your task, assuming I have understood correctly, I would suggest the following function, accepting three arguments: (defun vsfromatt ( src-blk src-tag tgt-blk / e i n o s v x ) (if (setq s (ssget "_X" (list '(000 . "INSERT") '(-04 . "<OR") '(-04 . "<AND") '(066 . 1) (cons 002 (strcat "`*U*," src-blk)) '(-04 . "AND>") (cons 002 (strcat "`*U*," tgt-blk)) '(-04 . "OR>") ) ) ) (progn (setq i -1) (while (and (setq e (ssname s (setq i (1+ i)))) (not (and x v))) (setq o (vlax-ename->vla-object e) n (strcase (vlax-get-property o (if (vlax-property-available-p o 'effectivename) 'effectivename 'name))) ) (cond ( (and (null v) (= n (strcase src-blk))) (princ (strcat "\nFound source block \"" src-blk "\" with handle \"" (vla-get-handle o) "\".")) (if (setq v (LM:vl-getattributevalue o src-tag)) (princ (strcat "\nFound attribute with tag \"" src-tag "\" and value \"" v "\".")) (princ (strcat "\nAttribute with tag \"" src-tag "\" not found in block \"" src-blk "\".")) ) ) ( (and (null x) (= n (strcase tgt-blk))) (princ (strcat "\nFound target block \"" tgt-blk "\" with handle \"" (vla-get-handle o) "\".")) (setq x o) ) ) ) (cond ( (null v) (princ (strcat "\nNo attributed blocks with name \"" src-blk "\" containing attribute \"" src-tag "\" were found.")) ) ( (null x) (princ (strcat "\nNo dynamic blocks with name \"" tgt-blk "\" were found.")) ) ( (null (LM:setvisibilitystate x v)) (princ (strcat "\nUnable to set visibility state of block \"" tgt-blk "\" to \"" v "\".")) ) ( (princ (strcat "\nVisibility state of block \"" tgt-blk "\" set to \"" v "\"."))) ) ) (princ (strcat "\nNo references of either block \"" src-blk "\" or \"" tgt-blk "\" found in the active drawing.")) ) (princ) ) (vl-load-com) (princ) The above references several of my Dynamic Block Functions and Attribute Functions which you may download from my site, or earlier in this thread to support the operation of the above function. To evaluate the above function, you would define a basic program such as the following: (defun c:test ( ) (vsfromatt "AttributedBlock1" "AttributeTag1" "DynamicBlock2") ) In this way, you can operate on multiple blocks with difference names & attribute tags by simply evaluating the function with different arguments. This function assumes that you have a single reference of the attributed block & dynamic block (else, how would the program know which attribute value to use with which dynamic block reference), and the program incorporates several efficiency improvements: Rather than nested loops iterating over the set of attributed blocks and then the set of dynamic blocks, this function uses a single loop to iterate over a set containing both references and branches the operation depending on the block reference encountered. As soon as the function has acquired both the attribute value and target dynamic block, the function will exit the loop and attempt to set the dynamic block visibility state, with no additional iterations.
    1 point
  8. This is using my library routine Multi Radio Buttons.lsp, the main routine reads the visibility states of the block uisng Lee's code then they are displayed, it will accept up to about 20 states. If you post a block will see what I can do.
    1 point
  9. Yup... I just like to LEAVE those icons hidden so I don't accidentally turn them on. Cause whoops.
    1 point
  10. FYI, for anyone else that may come across this issue and doesn't have the icon in their tray...ISODRAFT will also solve it.
    1 point
×
×
  • Create New...