Recent Posts

Pages: [1] 2 3 ... 10
1
AutoLISP (Vanilla / Visual) / Re: 3d polyline splitting
« Last post by mariolino0099 on Today at 05:56:33 AM »
Please can anyone help me ?
Thanks
2
AutoLISP (Vanilla / Visual) / Re: finding nested xrefs - AutoLISP
« Last post by Lee Mac on Today at 05:03:23 AM »
Excellent, Lee. Thanks for sharing.

You're welcome  :-)

Curious, what is the order of the list that (_xrefhierarchy) returns? Is it random based on how tblnext finds the refs?

The order in which they are encountered in the block symbol table, in reverse (though, a simple sort could easily be applied).

Also, does it always list the "deepest" (child) references first, followed by any parent xrefs w child xrefs?

No - the list is merely the order in which they are encountered in the block symbol table; the nesting hierarchy is determined by recursively querying list items with multiple entries against the original list when printing the output.
3
AutoLISP (Vanilla / Visual) / Re: Attribute Text Width
« Last post by HOSNEYALAA on Today at 03:44:56 AM »
can you  addition a sample dwg
4
AutoLISP (Vanilla / Visual) / Re: Attribute Text Width
« Last post by MeasureUp on Today at 01:58:09 AM »
Thanks.

I was thinking of using "vla-put-textwidth" but didn't figure it out.
Can anyone help?
Thanks again.
5
AutoLISP (Vanilla / Visual) / Re: finding nested xrefs - AutoLISP
« Last post by cadpoobah on May 06, 2024, 02:28:46 PM »
Below is a variation of the code I previously posted here, modified to apply to xrefs only:
Code - Auto/Visual Lisp: [Select]
  1. (defun _nestedxrefs ( blk / enx rtn xrn )
  2.    (while (setq blk (entnext blk))
  3. ...
  4.        (_xrefhierarchy)
  5.    )
  6.    (princ)
  7. )

Excellent, Lee. Thanks for sharing.

Curious, what is the order of the list that (_xrefhierarchy) returns? Is it random based on how tblnext finds the refs? Also, does it always list the "deepest" (child) references first, followed by any parent xrefs w child xrefs?

What I see is something like this:
  (("Child1") ("Child2") ("Childn") ("Parent1" "Child1") ("Parent2" "Child2")...)

6
AutoLISP (Vanilla / Visual) / Re: [request] Radiant Pipe Layout
« Last post by ribarm on May 06, 2024, 10:34:10 AM »
John, I coded for sample which is going to be copied like in my shown example... If you want 9.0 from bottom of room, just move sample for 4.5 upward and add small line for entering which connects sample and entering point... Sample is calculated the way that allows exiting pipe to be distanced from wall for 9.0 units from left wall side... So exiting and entering pipes are distanced at 9.0 units between each other... My picture explains everything, only you wanted to move sample for 4.5 upward; you must add small pipe line if you want or keep like you want and not like it is with my picture...
That's all, I hope it helps...
Regards...
7
AutoLISP (Vanilla / Visual) / Re: [request] Radiant Pipe Layout
« Last post by JohnK on May 06, 2024, 10:15:42 AM »
Thank you.
The picture looks promising but when I ran a quick test I didn't get good results.

I entered 9 as my "offset distance".
8
AutoLISP (Vanilla / Visual) / grread to quick keyword
« Last post by masao on May 06, 2024, 09:46:21 AM »
hi~i read this https://www.theswamp.org/index.php?topic=34804

and has two questions about grread

1)

if i want to add else keyword into LM:UCS-ssget,how can i add it.

(setq size (LM:UCS-ssget (strcat "\n->[ARC(A)/CIRCLE(B)/ARC and CIRCLE(N)]
\n->Filter by:[radius size(R)/circle color(C)/circle linetype(L)]
\n->select object or[setting(S)]{now radius size" (rtos radius size) "now circle color" (rtos circle color) "now circle linetype" circle linetype "}:")))

if key A

(ssget (list '(0 . "ARC")))

if key B

(ssget (list '(0 . "CIRCLE")))

if key N

(ssget (list '(0 . "ARC,CIRCLE")))

if key R

enter radius size setting

(setq radius size (getreal))

then back (setq size (LM:UCS-ssget

if key C

enter circle color setting

(setq circle color (acad_colordlg 7))

then back (setq size (LM:UCS-ssget

if key L

enter circle linetype setting

(setq circle linetype (getstring))

then back (setq size (LM:UCS-ssget

if i key A and setting radius size=5 circle color=2 circle linetype="HIDDEN"

get (ssget (list '(0 . "ARC" (cons 40 5) (cons 62 2) (cons 6 "HIDDEN"))))

it can make it?

2) and grread can use both getstring and keyword , if enter getstring word not affected by keyword(if Key A can enter else funtoin but getstring word has "A"  alphabet.)

on grread funtion use Right click and Enter has different?
9
AutoLISP (Vanilla / Visual) / Re: dietpl.lsp - solving endless while loop
« Last post by MSTG007 on May 06, 2024, 08:00:32 AM »
Nice Job. Very Powerful.
10
AutoLISP (Vanilla / Visual) / Re: Attribute Text Width
« Last post by ribarm on May 06, 2024, 07:57:28 AM »
Thanks for the help.
And sorry for the late reply as too busy after Easter.

Another thought...
How to update the text width if it is an attribute in title blocks in a multi-page drawing?
Thanks.

Have you tried changing this line :
Code: [Select]
(setq sel (ssget '((0 . "INSERT") (2 . "BLK-01"))));BLK-01
To this :
Code: [Select]
(setq sel (ssget "_X" '((0 . "INSERT") (2 . "BLK-01"))));BLK-01
And then iterate through sel. set 'sel'...
Pages: [1] 2 3 ... 10