really i need help

really i need help

abdulellah.alattab
Advocate Advocate
13,198 Views
70 Replies
Message 1 of 71

really i need help

abdulellah.alattab
Advocate
Advocate

Please i need lisp to do this task 

 

Old topic link

https://forums.autodesk.com/tUntitled-13-2.png⁸5/visual-lisp-autolisp-and-general/call-for-help-cranking-polyline/td-p/13362612

0 Likes
Replies (70)
Message 41 of 71

abdulellah.alattab
Advocate
Advocate

Thank you sir, don not worry , work according to your available time, I don't want to bother you more ، Thank you for your patience, we rarely see people like you, I wish you the best wherever you are

0 Likes
Message 42 of 71

Moshe-A
Mentor
Mentor

@abdulellah.alattab ,

 

Some clarifications on test result1.png & test result2.png

(on test result3.png we will talk later 😀)

 

test result1.png

the bar angle is determinize by the first axis line (the left) -90 degrees. if you specifies the direction as 270 degrees, the bar will look like it turn 180 but it is the right direction. remember by setting bar depth to a negative value, you will get bar upside.

 

test result2.pgn

Do not understand the meaning of 0.55 & 1.454, you have full control of the extending value to achieve any length you need.

do you you want to limit it?

 

Moshe

 

 

Message 43 of 71

abdulellah.alattab
Advocate
Advocate

Hi sir / Moshe

 

Regarding observation No. 1 of the experiment result, you are correct and I recently realized it in the order of instructions that you mentioned in the previous version regarding the depth value with a negative sign, but there is no need for the depth with a negative value if the axes are vertical and the direction of the order of selecting the axes has changed.

 

Regarding the second note on the results of the experiment, there are no limits to the values ​​as I mentioned. All that matters is that I have attached to you the values ​​written in the user interface, and the values ​​that the program calculated in order to show you that the outputs are incorrect, as they are greater or less than required.

 

 

 

0 Likes
Message 44 of 71

abdulellah.alattab
Advocate
Advocate

As showen  in user interface attached in test result 2.png 

 

Addtional s-l & s-r was disabled  as showen 

Just length 2 & 3 and there reteat ratio as showen 

 

Refer to values that appear in  user interface attached in test result 2 .png 

 

0.55 & 1.454 it must be = 3*1/3 

 

Ther is an mathmatical issue in caculating etendending line beyond main field axes 

 

It is noted in the second version that when I change the value of Addtional S-L & S from 50 to any other value, as well as with Left & Right Hooks from 25 to any other value, the program does not know about changing values and remains The original values of 50 and 25 for both variables, and when t re-run the program to do new polyline , the restructuring of 50 and 25 and does not retain old user inputed values , the witness is in the length of the extension required for the line in the sense that it is equal to the value Addtional S-L + Length 2 X Retreat ratio 2, as well as the right field

0 Likes
Message 45 of 71

abdulellah.alattab
Advocate
Advocate

I believe in your abilities, you have accomplished the task smoothly and amazingly, and you will not find any difficulty in achieving some refinement.

0 Likes
Message 46 of 71

Moshe-A
Mentor
Mentor
Accepted solution

@abdulellah.alattab ,

 

while adding the new features, i encounter a serious bug that constantly freeze my AutoCAD right after invoking BAR1 command, took me 2 days to find it (eventually have a success 🙏) attached the update.

 

here are the new features:

 

1. works in meters.

2. the number of decimal units is controlled with units command.

3. After specifying (or selecting) axes lines, you can fine tunning them by changing the distance and/or angle. when using Length1, only the right axis        line will move. when using Bar Angle the first point of the left line is used as base point for the rotation. you will see the change only after the dialog      is close.

4. Specify distance 2/3, use this button to specify distance for Length2/3 and S-L/S-R. to achieve that enable the switch (toggle) on it's left.

5. about text Height...i disagree with you, i believe that dimscale should represent the the scale (size) of all objects that need to be scaled

   (e.g symbolic blocks, dimension, leaders, annotations,  texts) and this means setting it to 50 for 1:50, 100 for 1:100, 25 for 1:25 and so on...

   so to solve this disagreement i though on dimstyle which has dimvars for dimscale, dimtxt & textstyle. so you need to add appropriate dimstyle

   and set dimscale 1.0 for 1:100 (this is for meters) 0.5 for 1:50 or 0.25 for 1:25 also make sure to set the text style.

6. Overall Bar length, well this value is taken from the pline after it's draw (do not have it when dialog is on).

7. Bar label as your request, you should think to upgrade it to block with attribute that contains the quantity, bar type, diameter and length.

 

enjoy

Moshe

 

 

MosheA_2-1746791703982.png

 

Message 47 of 71

abdulellah.alattab
Advocate
Advocate

Hello sir, your idea is great regarding the control buttons in the upper section, I recorded the screen showing the previous problem and indicated by number 1, also forgive me for asking for a very small modification, which is to replace the drop-down menu from dimstyle to textstyle, the problem of the font size not responding to changes in the annotation scale remains, if it is necessary then I do not see the need to include the polyline segments  parts of the polyline, only the user lable with total length with two decimel values after dot with nearest to 0.05   is sufficient 

0 Likes
Message 48 of 71

abdulellah.alattab
Advocate
Advocate

It seems that you discovered the problem that we suffer from in work during the quantity take-off, there is an application that we depend on to conduct the inventory process and it needs a lot of modifications that enable the user to adapt it more, and in any case it is tiring to use it because the entry process is not linked to AutoCAD and it would be amazing if it became one day a Lisp with a graphical interface for AutoCAD

 

Appication was attached below 

 

0 Likes
Message 49 of 71

Moshe-A
Mentor
Mentor
Accepted solution

@abdulellah.alattab ,

 

BAR1 takes (make use) from the selected dimstyle only these dimvars: DIMTXT, DIMSCALE, DIMTXSTY

text height is a product of DIMTXT * DIMSCALE. that's is why i recommended you to prepare a dimstyle (duplicate from standard)

with DIMSCALE set as:-

1.0    for 1:100 dwg scale

0.5   for  1:50  dwg scale

0.25 for  1:25  dwg scale

 

These dimscales will produce text height exactly 0.18 mm on printer, as long as DIMTXT is set to 0.18 😀 the label would be little bigger by 20%

no other dimstyle dimvars need to be change (only if you want) except for the DIMTXSTY which is the textstyle.

the annotation scale is ignored cause the text is added to drawing directly (without using AutoCAD standard command)

in future if you want? we can make use of other dimvars like DIMPOST.

 

If you draw bars in 3 scales, prepare 3 dimstyles with the right dimscale.

 

The axes lines must be specified from bottom to up and the bar angle will be -90 degrees (i am repeating this cause i saw in video you not specifying it in this direction) although the program tries to correct your selection but i can not guarantee it will succeed. 

 

forgot to mention earlier, you said there is not need the Bar Depth to be negative but on your message #27 on 2nd page on pic Bar1-1.png

you post 5 cases and case-5 is upside am i right?!

 

enjoy

Moshe

 

 

Message 50 of 71

abdulellah.alattab
Advocate
Advocate

Unable to offer adequate thanks, I will try to understand the right way to regarding the text height 

 

0 Likes
Message 51 of 71

abdulellah.alattab
Advocate
Advocate

I want to become as skilled as you. I have a passion for programming since my university studies and I achieved high marks in it. I have a master’s degree in civil engineering and I would be happy if you hold my hand and guide me on the right path to prepare VLX programs.

0 Likes
Message 52 of 71

Moshe-A
Mentor
Mentor

@abdulellah.alattab ,

 


@abdulellah.alattab wrote:

I want to become as skilled as you. I have a passion for programming since my university studies and I achieved high marks in it. I have a master’s degree in civil engineering and I would be happy if you hold my hand and guide me on the right path to prepare VLX programs.


in AutoCAD/AutoLISP documentation there is whole topic explaining how to create a VLX files (see this link)

 

https://help.autodesk.com/view/OARX/2025/ENU/?guid=GUID-1412948C-762E-43D9-8F38-CF58B17ADD73

 

two objectivities to create vlx

1. Protect source code from been copied and change by others.

2. Wrap some source lisp files including other support files (like fas,dcl,txt) to one running lisp file.

 

Moshe

 

 

 

Message 53 of 71

abdulellah.alattab
Advocate
Advocate

Thank yiu very much  sir 🤝

0 Likes
Message 54 of 71

Moshe-A
Mentor
Mentor
Accepted solution

@abdulellah.alattab ,

 

Could not leave it unfinished 😀 you now have on-line Total Bar Length 

make sure the number of digits for length & Angle is properly set in UNITS.

 

enjoy

Moshe

 

 

Message 55 of 71

abdulellah.alattab
Advocate
Advocate

@Moshe-A 

I swear to you that I expected that, because it is very clear that you are a person who likes to complete tasks accurately. Thank you, sir. Everyone here has become happy with what you have accomplished for them and they wish you success.

0 Likes
Message 56 of 71

abdulellah.alattab
Advocate
Advocate

@abdulellah.alattab wrote:

Please i need lisp to do this task 

 

Old topic link

https://forums.autodesk.com/tUntitled-13-2.png⁸5/visual-lisp-autolisp-and-general/call-for-help-cranking-polyline/td-p/13362612



Just so you know, sir, I have attached a snippet from an engineering project where I used the program you made. In fact, sir, what you accomplished saved a lot of time. I hope you can call it the final round. I didn't want to be too insistent, and I think you won't leave us halfway through. I hope you get rid (remove ) of the lengths of the polyline segments indicated in red. We have a Lisp assistant to do that. I also hope you make the program create its own text style called Moshe-A in your honor, and that it is not annotative. The program inserts the label at the same point where the bar is inserted. The user can choose the justification point for the text. The user can also enter the text height up to a decimal point of 0.001. Excuse me, sir, my colleagues had a lot of difficulty and effort in understanding how to control the text height, and we only need a label for the bar with the length attached next to it. I will attach to you the program we use to know the lengths of the polyline segments, and I will attach to you a snippet of an engineering drawing, and you will understand. If you activate the option to add lengths, there will be a huge amount of text that we do not want. I really thank you for adding the feature of knowing the length of the polyline before drawing it, because it helps us a lot during the quantity survay QS  without the need to draw, which enables us to modify the settings to achieve cuts in the reinforcing steel bars without a lot of waste.

0 Likes
Message 57 of 71

abdulellah.alattab
Advocate
Advocate

They need bar label with length 

0 Likes
Message 58 of 71

abdulellah.alattab
Advocate
Advocate

I think it would be foolish if I asked you to have the program request a point to insert the bar and then request a point to insert the text. I would put my hand on my heart if that happened.

0 Likes
Message 59 of 71

Moshe-A
Mentor
Mentor
Accepted solution

@abdulellah.alattab  hi,

 

1. i started to warry you vanished for few days, i needed the feedback 😀

2. you want to remove segment dimensions and leave only label - ok this on me.

3. dimstyles is the most useful way in AutoCAD do insert dimensions (you do not insert dimensions at all?)

    sorry to say but the thinking in your office is past for decades. to draw dimensions that are not comply with dimstyle is totally wrong.
    all your user need is to prepare a "reinforce"  dimstyle (could be any name, do not need it my name)

    (and if they do not know how to do it you do it for them or i can sent you one)

    and set it's dimscale to 0.5 for scale 1:50 (as i explained it before more than once)

    the beauty of BAR1 is that it puts the label automatic in center of the bar. and the text height is fixed for 1:50 (in any scale) and text style is fixed

    and the text position is fixed (alignment = middle) why they need to set these setting each time they add a bar? - believe me they don't!

    if they ever have a need to set a new text height (or text style) they need to go to the "reinforce" dimstyle and modify it there and do a save

    the base text height dimtxt is 0.18 that produce 1.8 mm in paper plot (yes at any scale).

    if you want a bit bigger height? set it to 0.2 to get 2mm and so on...you really need to start change your thinking about dimstyle.

    annotaive dimstyle does not matter to BAR1 because BAR1 only takes from "reinforce" the dimscale + dimtxt + textstyle.

 

    pause to pick the position for the label has no logic. let BAR1 put it in place and then user MOVE command to move it any where you like

    believe me, most of the times the bar label would be in center at fixed height at fixed text style.

  

Moshe

 

 

Message 60 of 71

abdulellah.alattab
Advocate
Advocate

My employees are not professional users, and there are a hundred tasks they think about other than drawing, and you can really say that we still think with a medieval mentality. We started learning AutoCAD 2000, and some of them still prefer to stay on it for fear of finding difficulty that will hinder them. They got used to certain commands in certain places. When I tell them something called annotation scale or system variable, I feel that fear that follows people who are in the dark, and I came to light them and name their worst fears. My friend, with this program, you have achieved a miracle for them. Up until now, they are shocked that they have a magic tool. Take as much time as you want, don’t worry.

0 Likes