Recent Posts

Pages: 1 ... 3 4 [5] 6 7 ... 10
Hi there,

I'm looking to try and figure out a way to automatically run the "Geographiclocation" command and fill in parameters that are asked for.
The selected values will always be the same, I'm just looking to find a quicker way to run the command without having to manually input the information each time.

Attached is a .txt document outlining the process of inputting the correct information at each step.

If there is anything that I can clarify plase let me know, or even let me know if this is possible todo in the first place.

Any help would be greatly appreciated.
AutoLISP (Vanilla / Visual) / Re: Block with attributes from CSV file
« Last post by nekonihonjin on August 10, 2022, 10:58:25 PM »

Now it's working, thanks BIGAL!
thanks for the reply BIGAL, makes perfect sense what you say if I wanted one action after another, but it's not the case, if I do it that way, I would have as a result a routine that opens the flatshot command and creates a block with the content of the whole drawing, located where the object is, and also a flatshot command that asks me to select objects and would create another block with only selected objects but located in a random place as the original flatshot command does.

I need that only once the command is invoked, and creates the block with only the selected objects AND in the place of the original objects.

I don't know if I explained myself well

AutoLISP (Vanilla / Visual) / Re: Combine 2 lisp (or a new one that does what both do)
« Last post by BIGAL on August 10, 2022, 10:37:13 PM »
Just copy and paste into 1 file, the code has seperate defuns for the actions so your last 2 lines in new lisp are. Then just load, it will auto run.

(c:the correct defun to do 1st)
(c:the second defun to do)
AutoLISP (Vanilla / Visual) / Re: Still learning, but now trying to make an "L" shape.
« Last post by BIGAL on August 10, 2022, 10:19:50 PM »
Its called a pencil, yeah often the answer is just do it manually and write down the steps so your (command just does the same same as when making the shape I drew on a piece of paper the point ids so I knew how to connect for the pline.

The mapcar function can be used to + - * / say 2 points

Code: [Select]
(setq pt3  (mapcar '+ pt1 pt2) )  ;  adds

(setq pt3 (mapcar '(lambda (x) (/ x 2.0)) pt3)   ;  divide pt3 by 2

these 2 are same answer
(setq mp (mapcar '* (mapcar '+ p1 p3) '(0.5 0.5))) ; midpoint of 2 points a double add 2 pts then multiply by 0.5
(setq mp (mapcar '/ (mapcar '+ p1 p3) '(2.0 2.0))) ; midpoint of 2 points a double add 2 pts then divide by 2

(setq pt3 (mapcar '+ pt3 (list X Y 0))) ; adds x and y to a point value can be X or Y or Z

This seems to work for dim ang and pline, it uses mid pt of legs

Code: [Select]
(command "dim" "ang" (ssget pt1)(ssget pt2) pt3 "" "" "exit")
AutoLISP (Vanilla / Visual) / Re: Block with attributes from CSV file
« Last post by BIGAL on August 10, 2022, 10:10:49 PM »
If you set attreq 1 for a start this means except attributes, then a simple -insert.

(setvar 'attreq 1)
(command "-insert" bname s 1 pt 0 att1 att2 att3 att4 ....)

Look at your code its almost there.
Hey guys,
I found these excellent routines by Marko and Kerry, one generates a flatshot and inserts the block in the same place of the objects; while the other one allows to select objects to flatshot, instead of doing it with the whole drawing.

Could one of you be so kind as to indicate me the steps to follow, if this is possible to combine them, or what could be done to create one that does both functions?

thanks in advance.
AutoLISP (Vanilla / Visual) / Re: Switch Block Attribute Value According to List
« Last post by mhupp on August 10, 2022, 03:07:42 PM »
Looks like RLX has something kinda like that but searches for x y z coords.
Found that I had put the fillet command in the wrong place in the code and the mapcar lines needed to be after the pline command. Also, I was able to get the dimension command to work for both legs, but I am trying to get an angular dimension between the two as well. I tried to re work the line as such (command "dim" "Angular" "Vertex" p2 p3 p1A "" "exit") but it's not working. The line (command "dim" "align" pt2 pt3 pt9 "" "exit") worked great for the angled leg though.

Any guidance would be greatly appreciated.
.NET / Re: Loft with Editor.Command()
« Last post by danjeff on August 10, 2022, 01:39:41 PM »
Editor must be available, I wrote a node to write a message on the Command Line.

I'm not sure what the problem is but ZT nodes never should dispose the transaction, so no using construction.

Interesting. I seemingly haven't had any issues in my working nodes with disposing of a transaction, however the example shows using/disposing the DyanmoApp.Services.DocumentContext transaction causing errors where I have created a transaction within Autocad. I'm quite new to this though so I'm likely just ignorant on the topic.
Pages: 1 ... 3 4 [5] 6 7 ... 10