Practical AutoLISP Programming - Beginner to Advanced | Arnold H. | Skillshare

Practical AutoLISP Programming - Beginner to Advanced

Arnold H., Sr. Software Developer, MCSD, MCAD

Practical AutoLISP Programming - Beginner to Advanced

Arnold H., Sr. Software Developer, MCSD, MCAD

Play Speed
  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x
80 Lessons (6h 24m)
    • 1. 1

    • 2. 1

    • 3. 1

    • 4. 1

    • 5. 1

    • 6. 1

    • 7. 1

    • 8. 1

    • 9. 2

    • 10. 2

    • 11. 2

    • 12. 2

    • 13. 3

    • 14. 4

    • 15. 4

    • 16. 4

    • 17. 4

    • 18. 4

    • 19. 5

    • 20. 5

    • 21. 6

    • 22. 6

    • 23. 6

    • 24. 6

    • 25. 6

    • 26. 6

    • 27. 6

    • 28. 6

    • 29. 6

    • 30. 6

    • 31. 6

    • 32. 6

    • 33. 6

    • 34. 6

    • 35. 6

    • 36. 6

    • 37. 6

    • 38. 7a UserInputFunctionPart1

    • 39. 7a UserInputFunctionsPart2

    • 40. 7b Getpoint

    • 41. 7c Getint

    • 42. 7d Getstring

    • 43. 7e Getreal

    • 44. 7f Getdist

    • 45. 7g Getcorner

    • 46. 7h Getangle

    • 47. 7j Getkword

    • 48. 8

    • 49. 8b entsel

    • 50. 8c entnext

    • 51. 8d entlast

    • 52. 8e entget

    • 53. 8f exercises

    • 54. 8g Solutions

    • 55. 9a SelectionSets

    • 56. 9b ssget

    • 57. 9c ssadd

    • 58. 9d ssdel

    • 59. 9e ssmemb

    • 60. 9f ssname

    • 61. 9g sslength

    • 62. 9h Exercises

    • 63. 9i SolutionsToExercises

    • 64. 10

    • 65. 10

    • 66. 10

    • 67. 11

    • 68. 11

    • 69. 11

    • 70. 11

    • 71. 11

    • 72. 11

    • 73. 11

    • 74. 12

    • 75. 12

    • 76. 12

    • 77. 13

    • 78. 13

    • 79. 13

    • 80. 14

  • --
  • Beginner level
  • Intermediate level
  • Advanced level
  • All levels
  • Beg/Int level
  • Int/Adv level

Community Generated

The level is determined by a majority opinion of students who have reviewed this class. The teacher's recommendation is shown until at least 5 student responses are collected.





About This Class

You will understand and learn AutoLISP and how it is being used in AutoCAD

You will have a deeper understanding of AutoCAD objects and how they can be manipulated by AutoLISP without even touching them.

You will learn how to create your own AutoCAD Shortcut Commands and Macros

You will be able to create simple to medium complexity Programs from scratch with the help of several exercises to reinforce what you learn

By the end of this course, you should be able to develop your own programs to increase your productivity. For example:

start automating repetitive tasks

develop programs that extracts drawing information and many more…

And most importantly, you will become an AutoLISP programmer

Meet Your Teacher

Teacher Profile Image

Arnold H.

Sr. Software Developer, MCSD, MCAD


Hello, I'm Arnold.

See full profile

Class Ratings

Expectations Met?
  • Exceeded!
  • Yes
  • Somewhat
  • Not really
Reviews Archive

In October 2018, we updated our review system to improve the way we collect feedback. Below are the reviews written before that update.

Your creative journey starts here.

  • Unlimited access to every class
  • Supportive online creative community
  • Learn offline with Skillshare’s app

Why Join Skillshare?

Take award-winning Skillshare Original Classes

Each class has short lessons, hands-on projects

Your membership supports Skillshare teachers

Learn From Anywhere

Take classes on the go with the Skillshare app. Stream or download to watch on the plane, the subway, or wherever you learn best.



1. 1: Hi there. Thank you for taking the scores and welcome in the scores. We will explore auto lease programming language and I will show you how it will help you be more productive in your day to day off God works. You will first discuss the functionality. Theoretically. Then we will apply what we've learned to reinforce your learning experience by seeing it in action at the end of some sections, there will be hands on exercises. Then you will compare your coat to the solutions provided the last section. We will develop real world programs Hands on. You are free to use the program senior work and even took it to your specific requirements and see you in the next video. 2. 1: Hi guys. We have lots to cover in this course as follows. Or the section one, The introduction. We will discuss what is arteries and the benefits are learning it. We will identify who is this course for you also get to know the author as well. We will also discuss what version of autocad that you can use Our police and the tools we will need to develop our program for a Section two Quick Queen demo before we dive into the details of learning are police. I will show you first how you can quickly gain knowledge that you can apply into your own everyday work by following the demo and create your own macros. Yes, well, get to know some Ah, other dysfunctions in section three rules in our police, there are a few rules to be followed when developing onto these programmes. You're very easy rules and it shouldn't take long for you to have a good grasp of them for a section. For both of these variables, you will learn how to create variables and how to store data in them. We will also understand how to manipulate stored values in those variables. Number five month functions. Police also offers extensive math functions, and we will explore them, especially the commonly used ones for Section six list functions. Lists are the heart off Italy's and they are used extensively. All of the hard data models are presented in lists. You will discuss an export in detail, each one of them or section seven user input functions. These are the functions that interact with you, sir. We will discuss most of the commonly dysfunctions thoroughly and develop some programs for each to see them in action or section eight object selections functions. This functions will allow us to select out what objects, whether it is selecting a single object or multiple objects. We will go through each one of them and see the difference as well as learn how we can use them in our program. We will also be using some of the least functions in these examples. In Section nine. Selection sets, learning and understanding selection sets will be a so much power toe work with outward objects. These where we can use extensive automated processing without touching upward objects. We will also have thorough examples for each of the functions. Section 10 conditional functions. This section will give us a good knowledge and how to apply logic when developing our programs. We will apply most of these functions when we discuss not with Outward objects data model Section 11 but about the Objects data model. We will dig deeper into the ultra data model. How they work in AutoCAD and how to interact with them is going to be a very, very interesting lesson. Section toe symbols, object handling functions. Knowing the AutoCAD stated Dictionary is also a gives us a great advantage when developing off. For these programs, we will explore how the layers styles line types are being stored and how to reach them remote, as well as how to use them in our code or section 13 Hansen programs. We will be developing rial world programs that showcased the functionalities in different sections from different sections. You can use on all these programs into your work, or you can modify them to fit to your requirements. Or you can just use it for reference when you are developing your own functionalities. So these air all the things that we're going to cover for this course by the end of the score. She should have a very good understanding of arteries. And I should say you should be more confident developing out of this programs, so will come to the course and let's get started. 3. 1: Hi. In this video, we will understand Utley's So what this authorities police is autocrats embedded programming language. It is used to create programs to manipulate in process drawings automatically. It is a procedural programming language and very easy to learn. You can create or customizer on AutoCAD commands and functionalities. It can automate repetitive processes. Imagine how efficient and productive you will be if your programs do the work for you. Learning Auto List Nut Onley Increases Your productivity. What gives you the power to develop anything you want to do with your drawings? If you have been using AutoCAD for many years and haven't used or tried authorities, then you are missing a very powerful tool. It's about time to further improve your skills by learning authorities. We will go through the very important functions, and we will develop lots of programs that will improve your productivity. Besides autocrats commands, you can also create your own Commander Taylor to your requirements. Bid A simple as a shortcut command or a full blown application. Only your imagination is the limit. So that's ah, what author this can do for you. I was here in the next video 4. 1: Hi there. In this lesson, we will identify who is discourse for this course is intended for designers. When you are creating, let's up drawing prototypes, you can use authorities to do that if you are an architect or an engineer, and they're doing some drawing analysis and the sign, you can also make use up police programs. If you are a draftsman, you can develop efficient custom commands for your everyday use. You work as a cut operator and you're doing conversions from blueprints to digital formats , or you're doing some digitizing works for AM FM. Like automated mapping and facilities management applications, you can develop less up. Author this programs when you work as a quantity surveyor and you want to have on automated inventory of all the components for each discipline in the drawing, like electrical parts, mechanical components, separate cetera, you can create a notorious program for that. Or basically, this is also intended for all AutoCAD users. We just wanted to expand their knowledge, be an autocrat to the next level and be more productive. It is very, very useful for us well, and of course, if you have a passion to learn new programming language. Why not? It's when these, uh for us. Well, so Ah, you have lots off leverage to use the authorities programming language. In the next lesson, we will discuss what you learn from the scores on. See you there. 5. 1: hello. In this video, we will determine and identify what you're going to learn from the scores. I have identified a few, but there could be more. First off, you will understand and learn the basics of authorities and how it is being used in AutoCAD . You will have a deeper understanding of AutoCAD objects and how they can be manipulated by off the list without even touching them. Your those who learn how to create your own AutoCAD shortcut commands and Mac Rose. You will be able to create simple to medium complexity programs from scratch with the help of several exercises to reinforce what you've just learned. By the end of the score, she should be able to develop your own programs to increase your productivity. For example, start automating repeated the tasks develop programs that extracts, drawing information and many more. And most importantly, you are now on auto lease programmer. So in the next lesson you will company who the author is, and I see you there 6. 1: Hi, guys. My name is Arnold Hungry. I am a senior software developer with more done 20 years of software development experience . I have worked on several industries ranging from architectural engineering and construction , UTV piece marketing, telecommunications. And now, in Financial Corporation. I have been exposed to many different technologies and frameworks and programming languages , Developing applications using C Sharp Java visual basic Michelle Basic for applications and G. I s applications. I also worked on many different in the enterprise data basis, like Secret Server Orica than Sai bees. Believe it or not, I started my programming career using authorities. I am a self thought programmer and learned the basics. An advanced techniques, arteries reading through the documentations in manuals at the time, lying when I read and constantly practicing coding. And now I'm sharing my knowledge with you how I wish I have these video when I was just starting. All right, so that's just about me. See you in the next video 7. 1: hi. In this video, we will identify the benefits of learning authorities. So why I learned up, please? The first major reason I can think of why you should learn other list is productivity. Once you know how to program in Natalee's, your productivity really improved immensely. It is very straight forward to learn, not least on its own. Once you have good knowledge off AutoCAD objects and operations, you can create your own AutoCAD commands, perform advance calculations and drawing analysis can actually create drawing from scratch . You can interact with the user by providing them with program options. We're cost to get user inputs. You can extract out withdrawing information in a certain format to be exported to other system. For example, the D. A s application. It doesn't need to be compiled. You can run directly from the common prompt other than authorities. AutoCAD also allows other programming languages for customization and extending its functionalities like we shall basic should basic for applications baby, that net she sharp and C plus plus No. These are very powerful languages. It has a steep learning curb, and you have to learn each of those languages separately. So I hope you are getting excited now and I'd see you in the next lesson. 8. 1: Hi there. So, what those do we need for this course? You need to have autocad installed any full version from really starting to AutoCAD 2019. The old support other leas. However, if you have AutoCAD lt version, they don't support auto dysfunctionalities. So make sure you have the full version in stone. Another tool that I I recommend that we use for this. Ah, tutorial. It's not my place. Plaice. You can download it for free from this website, or if you have any text elder of your choice, then you can use that to. But I recommend using the note, but plus plus because some features that we can make use off when we're developing out of these programs. So you can go to the website off? No, but plus plus and you can download in. Iverson is good, but in this tutorial, I'm using 7.5 point five released. So go ahead and download it. Now, let me show you a the features for developing after these publications using the butt blessed plaster before we start, you have to make sure that you select the least language here so that we can leverage the editors functionality when developing after this programs. So let's say we start with a new test program, slavery. But I would like to get all the lines in the drawing, see the highlighting of parentheses. Yes, and they close it the tab and they say, said Que nice. I say we just, ah, need the dashed lines in the drawing. See the closing parentheses, the equivalent opening parenthesis gets highlighted, so we minimize the chances off getting a malformed least error. Let's say you miss one or you have more than one, so it's always much is the opening. But that business with the closing one and Siri write another line of code here. Let's just get that leant up. The ninth selection set there are. There you go. So that's just a simple code. We can take advantage of these highlighting that's very, very important. If your code gets complex, it's quite hard to be bob program. It's not easy to find where's the malformed least. That's why having these, uh, features at least tell us a little bit. Okay, so once you have it installed, we should be ready starting developing programs. I'll see you in the next video 9. 2: hi guys. That's discussed in the previous introduction videos about how we can be productive in our day to day work using AutoCAD. We will do that right away by grading our own outward commands using arteries. If we rely mainly using the normal or basic outward commands, or we use the menus extensively, you are wasting significant amount of time just by navigating through the sequence of commands and manually providing every option required. We lose few seconds in every click of the mouse or in every keep keyboard stroke. However, if we have our own customers commands or Mac Rose, we can accomplish the same objective with the single command or fewer keyboard strokes and saving us time. So in this lesson, we will be using the blocks and tables Imperial drawing this one here, let me open that up. Let's go to the modern space. So these our test drawing now let's begin creating our own commands are macros. Let's start with the zoom Komen's so if you use the normal of what commands, we type in zoom and then window, for example. And if we went to go back, we went to zoom in previews or Let's say it is a window again and resume extent. We have to type Z and A and we we're back to the extent of the drawing. We can also make yourself solve this comments here. Let's say he's doing this area. You can use this one year So it is good, at least just one single click. And very good, however, for some other commands, like if we are deep into these area and we went to so call, there's always this extra stroke of the keyboard that needs to be crest. So what we're going to do is we will customize our zoom commands So there are a few ways to do that. We can in the command line directly. Let's say we de fund see defined function agencies that e for zoom extents when we typing Niko Months here. Oh man, zoom Then extent gin closing goes in. So a knife Let's say we are zooming in this area and he went to some extents just like this is, um, extents, or is that e in your back? You can also customized zoom previous, for example. The promise is seen. Let's say I don't want the Zet p because the distance from desert to peace quite far. So it takes a little bit of plant of typing is a Does that be I wanted to Could be just said set and then come on zone previous Enter its If you notice that he's basically the sequence of the zoom common typing the zoom, then enter be for previews and then enter It's a double code it's enter to double Coz is represented as enter So you're that and we're missing one more parentheses Here we learn all these in the next coming renews our videos how to create how to program in our police We didn't the same number off open and close parentheses. Okay, so now if I am for example, zoom in here and I want to zoom previews It's typing, doubles it and we're back. So it's very fast. You don't have to said E. You saved there at least a few seconds. One second, at least. So however, now we have do commands in in memory for this drawing. The problem with writing the romance in this command prompt is that if we close the drawing , let's say I close this drawing. I don't mean to save it, and we open it up again. Let's go to the modern space Cesar in here. And if I type my doubles it, it's gone. Which means that it's not stored in memory anymore. It's only after in your current drawing, however, there is, uh, work around for that. There's a proper way of writing, police recommence or programs. We can do that by right, creating our own pile. So in this case I have here open up that no, that class plus. So let's start creating our own commands now excrement out and put these to categorize each . Commanders say this is for the Zoom Commons. So instead of typing in the common, Bronte will type it here that, say, defined. See, is it e for zoom extents? Then we can issue the command zone. The extent, then that's it. Okay, let's do another one. Let's say the fun. See? Zoom all. Is that a command? Assume Oh, synced another one. Let's say C. So basically, this file will be your your own macros, so you can continually update this one or create your own commands. Once you get more familiarized yourself. I mean, without all these functionalities. But in the meantime, I would just like to show you how you can be more productive but productive right away by creating your own, uh, shortcuts. Does that set? For example? Canary, Come on, Zoom in previous saying this one never got here. All right, so let's start with this one. First, let me save this one in my computer here, creating that colder our police, her and it should be. And l s b father say my commands that l s b okay and save it. So now we have this one. So there are a few ways to load this program into our AutoCAD. One way is weaken. Do the note command specify the path using the front slash. It was starting my authority smolder and Michael Runts of NSP. Okay, so now if I type things that said, there you go. It's already active. I zoom in here and type. Is that e Is your extents crazier Mr Gannon's? Is that a for zoom? All there it is. So another way to do that instead up. You can actually just use the arrow up and down to let's say you have updated this wild, for example, we add another command. Let's say, uh, is that five is, uh, we're zooming with the scale factor of 0.5. For example, come and zoom your point by X. Okay, then we saved a while and we loaded here. So instead of doing the load common, we can also use the up comment or upload command. And then we can choose these, uh, function here to add the contents. This is the wire. I didn't It's already added. Okay, So close it now. Which means that if we close this drawing, save it and then reopen it back again, we go to our model. It is already created. So try that. Zoom here and said Set, Here you go. Let's say zoom five x point by scale factor said e. So that's it. For example, we add one more the fund see, and said to Come on, zoom. This Put this minuses scale factor too. Mr. Different bar times zoom times bigger and save it. If I close this run and you open it again every type is it to Yep. This is the first time since he so you can continually update your your command sleeps pile . Keep adding shortcuts, and you should be able to have your own command compilation. Ah, in the next video, we'll be exploring more on the layer commence and so we can optimize our working time with AutoCAD using those short cuts rather than going through the menus or the regular way of assuring those their commands and see in the next video. 10. 2: hi guys. In this lesson, we will create our own layer shortcut commands. We'll build upon the previous macros that we've created earlier. But first, let's examine how we usually ah, manipulate layers or how we work on layers every time we great new entities or we do Cem editing in the drawing. So usually we're working on. Let me just list down this. This is ah, this entity. This polar line is under earlier waas. Okay, so currently we're in layers zero. So let's say we were working on the walls. We have to go through the delayer command and set the walls, surveyor, current layer and the closest one. Then we can start, uh, typing our Uncle Martin, for example. So is under layer. Well, what's okay is good. However, there should be a faster way to do that. And every time we work on different objects and we have to go through here and change it accordingly, imagine if we have more than 50 or even hundreds of layers. We have to go through the lease and navigate the proper layer named and said it. Then that's just the time that we can start working in that layer. So we will use authorities to make our life easier to be more productive, to issue the their command more efficiently. For example, if we are working on walls, we can actually create a shortcut for that to make the world sister current layer immediately. So let's say difference. See Waas. Then we can issue the Koran Layer said Woes then enter. Okay, So if we saved this one and let's say I'm closing this one first and open it again just to no the updated file we have So now Currently we are under layer zero. If I type in walls No, we're in the rear wall. Okay. Another shortcut, Commander freakin user is Let's say we want to set the rules Is the current layer and and at the same time frieze all the other layers except world This weekend you can do that as well. Let us say Call it W F for example Waas priests. You can name it. Yeah, has any any names You want that this more from here to you are easier for you to remember in this example it's just labor. Thats wf so it's a command layer Sit world's then we're going toe Freeze all the other layers. Asterisk and enter. Okay, so now if I load this one, See, since my months, let's say let's change it back to mayor Zero, for example. That's the current layer. Close it. You're in your current clear zero. So you buy issue my waas risk. Oh, man, by the way, did you save it? I don't think so. We missed to save it this way. Doesn't all right tonight save. So it's just try noting again Now that would you have us here? Okay, so we used the w in current. There you go. We have the current layer walls and we frozen on the other layers except the current clear wall. Now we can work on this however we want. Okay, so now how can we turn them back on? So what we do is we should a layer again. Now they're all frozen except the world's, which is the current. We either select them 11 by one, or select them at the same time. And and thyroid. Okay. But still we have to go through is dialogue. And imagine if we have more than 100 layers. You have to go through a stroke down. It's quite tedious. So now why don't we just create another short cut? Another macro, to throw all the layers? So that's they create here. The fund. See Layer, though command the year, then asked theories. Oh, histories. And then enter. Okay, save it. Don't forget to save it. Had a resident one take your head and then we have to load it back again. So that's a very here issue again the world and freeze. Okay, now retired. Lt h There you go. So these, these are very, very useful commenced. You don't have to go through the dialogues and on or so whatever can do the same thing for , let's say, layer off or layer on. Let's say we create our their your own function. You're you can name get you name this one. However, you want command layer off Mestiri's except the current layer. Okay, so let's say we know this one again and we have waltzes. Our currently er by issue the there off command and check this run chip. The layers there are okay except the current players. The wall. It's the car clearing. It's on so we can create a layer on command, for example. Run there on stories. Okay, Save it. And loaded type O n. There you go. So that's just about it Can build upon the layer. Command straight your own shortcut Based on your needs. You can even say we have here the power. What are this receptacles here? You're under layer power so we can create. That's a defense. See? Power. Come on, Layer said power than enter Save it can noted. Now we have here the power command, so type in power. Currently, the current layer is wall waas retyping power. No, we're in there near power. So you can do the same thing If let's say you want to freeze or turn off everything except the power. This father this coming here. All right, so that's about it for layer commands or layer shortcuts. I mean, or macros. Think of some other use each that you might have. You might require. Then just keep building on this comments. All right. In the next video, we will explore on inserting blocks commands. I'll see you there 11. 2: Hi guys will come back in this lesson. We will create macros to insert blocks. We will continue working on our micro months that l s b file from previous lessons. So in this video, we will create some shortcuts or macros to insert different blocks. That's a We're deserving here, and we would like to create a This is a receptacle block may miss receptacle. So if released out the blocks, let's say if I may, if we want to create a one receptacle here, for example, in the laundry, are there different ways to do that? We can either copied existing one from the instruction going to see Mir ist location year. So that's one way. Or we can insert Tennessee receptacle and specify on the screen this near here. This, for example, here. Those are a different ways to do that. But we can create our own short to insert the receptacle in just one single command. So that's ah, great, that shortcuts now Micro's That said the names when the script agree as insert comments this right macro to insert the receptacle. Let's say I name it ir for insert your septic. Oh, then So first Before we insert the block, we need to sit the current layer to power, which are. All of these receptacles are under power layers power layer. So we need to issuing the your command said to power. Then enter right? No, we're in. The current were in the power later. That's the time you can insert our receptacle block insert with subletting perceptible. Then we paused to support the user. Inputs of the user can select where he wants to insert it. Then these are on the default values Insurgent point and your patience. So are and that's it. So we have here IR for inserting a receptacle. Let's save this one and let me just low that fire. It's no this boulder micro months. That and the speed so we have here are were in the A shortcut ir. Just get rid of this so they say I are. Then they can select anywhere he didn't need to copy from the source to the destination or using the manual insert and specifying the block, maybe insertion points. And so on. This type I are, and you can insert very quickly anywhere, right? It's saying it's a dining room stepping IR said the edge of the world, but by the window. So that's it. We now have our you know, our or my argument. It's intended for inserting receptacles, so that's great. One more for the lighting, for example, released This world is the lighting. The block name is slighting fixture under the layer lighting. So we do the same thing. It's open up our file and then I create a short cut for that. Let's say the name of this insert lighting. I l common layer said to lighting. Then enter next. Reinsert block. Insert lighting, fixture, then process for the insertion point. Accepted the phones and close the function. Save it. Okay, now we have the eye and shortcut going here. Let's see. It just wanted to insert. I was here. Steak that. Okay. Very straightforward. So can do the same thing for other blocks. Or if you have your own drawing, you can create your own shortcuts. Okay. In the next lesson, we will explore on some Codec commands where we can count the number off objects in the drawing or blocks. I will show you how to do just that. OK, I'll see you in the next video. 12. 2: Hey, guys, welcome back in this video we'll create our own macros to count the number of objects in the drawing. Specifically some of the blocks we will be using the awfully selection set functions. We really examined dysfunctions in more detail in the coming videos. In the meantime, I just wanted to show you how we can have our own co months that counts the number of objects or blocks in the drawing. So let's create our own command. We will build on top of the file that be paraded earlier. This time we will call it or that Come on. Scategory, for example, we have a requirement from the quantity surveying department. Count the number off receptacles in the drawing in this plan. So what we can do is create a function for that. The funds C C call it count receptacles and use Some of the selection said functions in authorities as they get, especially if I hear that filters zero is the entity type. It's an insert. And two is the black name, not name is your septic. Oh, okay. Great. Another variable called count. This is the count off. The selection said, Do you believe this The length of the selection said s s here. Okay, Then you will just ah provide the user with the message box or alert. Let's say under than we can coordinate the the message text with the number receptacles. So this one will be the Yukon this for heat account. So in order for that to be displayed without costing Cem error, you have to convert it from integer toe Askey school detour into your toe asking command and come. Okay. You know, just provide here one princey for clean Mexican, the function. Let's save this one and we go to five. No, see my command start NSP now we have the contraceptive dysfunction. Yes, we have 37 in the drawing, right? So that's how easy it is to count the number of objects in this is Pacific sample very counting the receptacle block. And the type is insert. Let's say we have another requirement to count the number of playthings so we can do the same thing. Just create their function to count the lights set que that's that's as the skin ex. Same thing it's ah, object type is insert to ISS. My think fixture create the count by checking the length of the selection, said Then we provided you survey the message. The lighting's being that drawing changer toe Askey come and then saved. The file can loaded. Okay, We haven't air here. It says extra red Prentice's It looks like we have here extra ward. See the highlighting? It should much the number of open parentis use with the closing Prentice's. So they should be good. Now, that's so good file again. There you go. Con flights. Yeah, we have another error. It's ah, it's a slab. Bees spelling your should be th not HD. Okay, so that by the again Nice. So let's have a complex. We have 29 lights in the drawing. All right, so this this is just basically the deep of the iceberg of Italy's power. In the next few sections, we will discuss more off the police functions. We will do it in both. The theory is, well, a supplying them in the drawing to see how the works and that see you there 13. 3: Hello. In this lesson, we're going to learn about the arteries. Basic fundamental rules. There are traders in Natalee's rule. Number one. For every opening parentheses, there is an equal and opposite closing parentheses. This work. So, for example, we are assigning number five into a variable nam. We have to do it like this with the opening and closing scientists, and not like this one here. This will result in the malformed list error. Remember to for every double coat, it's one here. There is always closing No. One code. For example, we assigned, ah, string hello world into a variable message. This is string should always being close in a double coat and not like this one. Here. Rule number three for numbers always avoid invalid. That pairs, for example, said Cuba 0.7. And not like said cue ball 0.7. This one. We even Aarhus Well, so let's take a look off One simple program that shows some beer. Some of these rules functions, so in here we define a simple function called get lines. We started with the opening parentheses and close with the closing Prevent. This is here and this is required if you don't have. Ah, a ah, local parameters in the drawing. So you said to leave it empty. But this to opening. Closing parentheses are equal. He's just the comment. So in this line, you might notice that we have 1234 opening parentheses. We should have, I mean, five. Plus this one year. So we have vibe, so it should have at least five closing parentheses. One, 2345 Same thing with this one here. 123 for 1234 And for the strings, see these double coat. These are this. Ah praises the first part. And this is the second part. They're both close in close in parentheses. And this part here is basically just come coordinating using the str can't command the number off nice in the drawing. So this function here determines how many lines we have selected in the drawing and converts it into from integer to ask character so it can be congratulated. So be mindful of this parentheses as it is very, very important. Otherwise, your code we let there be interpreted. Yes, it will be giving you some kind of mother form least error. The good thing with the tool that we're using. We're using the note, but Blast Plus, is that we can specify the type of program were writing in this language menu. Here we can choose the least language, and it should give us, Ah, the guide of closing and opening parentheses, for example. Here it highlights its equivalent, Mary Tyler. So this is a very, very useful right to identify whether we are missing, closing or opening parentheses or not. So make Jesus your before language and used to know but last place to greater programs. So that's just about it for the rules. Keep that in mind, because when you are developing programs, you can minimize your debugging time. When your code gets complex, takes timeto find the malformed least in the code to make sure that every line you're right . It has a matching number off Iran disease and double coats and see you in the next video 14. 4: hi. In this lesson, we're going to learn variables in Natalee's. We'll see how to define a variable and store values in it. So what are variables in Natalee's variables are very important. Nothing is foreign programming in general. It's used to store a value or least of values in memory, where your program can access and modify so two story value into a variable we used the function said Que So here are some of the examples we can define one buyable or multiple multiple variables in one line. For example, restore the value 123 into viable name Bar one. We can also define two variables here in one single line. So that's a set. Q W d or we, for example, and a lent for 10 for Ln. But you can define your own variable name. It's up to you. We can define us short or or longer as she wish for us. Long less. Uh, it's more intuitive in the program, where you can easily recall what values she starred in them and what it's used for. So another example is redefining the L type here for the lying type, for example, this is solely and we also define a new layer viable and store the text wall. So these are the three ways to and create a viable in a sign values in them. Now, if we're going to check the values of the variables, we use the penetration filtration mark here fathered by the variable name. So let's say re access the value of borrowing. Start here. We should get there. 123 for the read W D. We should get 2.5 for the oil type penetration l type. We should get solely. And also for the new layer, we should get the value walled. So now that we have stored all these values into your variable, we cannot use this in our command. So let's say we create a new layer. We basically issued this command command layer make, and then the name of the layer, which is the wall. So this will create a new layer called Whoa. Another example is we can great a new variable, which is the result off the calculations of these two variables within the length. So we get the area and we have this, uh, multiplication function. The asterisk, however, there are also, uh, pretty defined variable she Natalee's. They are a spa lows here. Basically, it is not recommended to use or over at B senior program because they have a pretty find function, meaning, Let's say, the post this variable ISS used to issues with the command function to pass for user input . Let's say you are issuing a function that you're worse user input, for example, that good point or get distance. Whatever you can use the suppose common and another one is spy a constant with the value off three point approximately 14 159 you know, so the character t he's defined us a constant t miss uselessly, none meal value. You can use this one in your conditional Zoran your loop so it is recommended not to overwrite or useless in your program. You can use it us. It's but don't override the functionality with values. So that's all about variables. We will explore this further in AutoCAD in the next video. See you there 15. 4: Hi guys. We've learned how to create variables in the previous lesson. In this tutorial, we will use them in the actual program. You will learn how to retrieve those values in use the value in our code. So let's get started. Initially, we created the variable one bar, one with the value of 123 So we check the value of bar one. Just put in the punctuation work and the viable name. They also created two variables in one declaration in one line, 2.5 for the week and for the length 10.0 We if we check the value with we have your 2.5 and for the length have 10.0. So now how can we trade a program to retrieve those values in, say, in our variable? Let's do exactly that. That's great. A simple program called call it area. Calculate the area. You said this, uh, this program to this. So we have a better corner coating secure w d that sport. It took 0.5 and set you l end or the land reaches 10.0 and we also declare another variable called area, which is the Yeah, the variable to store the results of the calculation or the area with them slept. And we prompt the user message the user with the outcome of deregulation, the area is Then we have your new function called really to string and convert this area into a stream. We need to actually coordinate that. So we need another function called. Yes, they are cut. That's for concatenation. But here and there. Princey Clean protein output. All right, so let's save this the program into fire. Let's say barce that l S p let's slow that while okay? No, we have one function here. Se Ri execute that function. We have 25. Let me show you first the effect if we remove this princess here and we load the program again and we execute the hulk area, you see this meal? We don't need that. So that's why we need the prince here for a clean, uh, output enough in here. Other characters showing in the results. So save the swing again. You know it execute area. Now we have a clean results. Just 25. Okay, so these good. However, these very, very limited function because all of the values are hard coded. Let's make another program to be more dynamic. So rather than hard coating the Value Street bill, let the user enter the with our entered a length. So that's great that you function the school called Area to said Q. Really? Now we will be using one off Italy's function called Get Really Enter the With dysfunction will get the value of whatever the user enters any story in the that would be variable. We'll do the same thing for the length. Get tria entered the length. No, we can create another variable called area. Basically, we just need to copy this for here, and you should be good. Now you can load the file, save it and loaded. And then we have a new function called called Area to That's straight up. So now we're being prompted with the with, so you can enter whatever number you like with a decimal. Let's say if you enter 3.5 and 7.6 for the length we have here, the good in 6.6 these our area. All right, so with this function here, we allow our program to be dynamic, So the user can enter any values that they would like to be calculated, and you can provide in the area can take this one to do more complex calculation. A. She wish. The important emphasis here is how we store those values into variable and how we consume those variables into our calculations. Yes, well as showing the output to the user. All right, In the next video, we will continue building on top of this by creating a new layer with that nine types and colors based on the user input, so I'll see you there. 16. 4: Hi, guys. Let's continue building on our program for the farce that l s B we created earlier on. So we also he also created a new variable, cold new layer and said the value too wrong. Yes, Well, as said, if you l type, let's set this 12 continues for the land type Then we can now make layer gonna issue the command layer and make based on the new layer the new layer value. So we now have layer wall. Okay, that lets ah make our program, uh, more useful so we can use it in the future rather than running it in the common from. And you see, just one time this great a new program called L M. Let's say you support this layer. Make or make layer. We have created these new layer called wall. Okay. It was so created. The line type continuous that's so secrete another variable called color red. And now we can issued a layer command. They're make what is the name of the layer and the new layer. Then line type type. It's continues than color and third burst in color. What is the color? But this one will be fine here. And then I just have two more enter here to accept the default values. Then we can from the user you got in it. The message, Mayor. New layer created. Okay, But here, Jeff Green sacrament, clean out. So let's save this file and loaded. No, we have here the l in function. But before I do that, let me just delete the layer wall that we created earlier. Okay, so now we only have layer zero. Now let's execute our l M function. There you go. We have your layer wall grated, and if we check the layer we have here the rear wall, every layer world with red color and land type is continuous. Okay, that's six. I'm in our program. So as with the calculation area, this Ellen function is not berry Ah, dynamic dynamic at all. I mean, it's not reusable, which means that whatever you define in these variables, that's just the one would be created. So let's make this function a more dynamic one. So that's straight. A new one called LM, too. We'll do the same thing, will use the same variables new layer instead. Ah, hard coding. The value speak in use one more out of this function called Get String. This function allows the user to enter a string, and we will store that value into the new layer valuable. So that's say, enter new layer name. That's our prompt to the user. Great! Another variable called hell type you with same thing gets string in turn you interline type for the new They er let's great Another variable called collar and used the same gets string function from the yusor color for the new mayor. Okay, so now that we have all these values in our variables, we can execute the same thing. That's this one. They're basically the same because the important thing is we now have all these variables populated with values based on the user inputs. Okay, And then we can just execute the layer, make with the new layer with the land type in the color, Then message the user that this new layer has been great and save the file No there. So we now have this l m to function that's execute that tell them to were no prompted with the new layer name entered a new layer name. So let's say stare. What's the line time? Maybe we used dashed. What's the color? Do the layer stairs? Great in here. Okay, being Simon delayer, we have here that stare with the blue color and the dashed line type. All right, so that's how easy these to prompt the user to get their inputs. And based on those values, we can issued appropriate command using those values in the variables. And that's it. In the next video, we are going to explore the course function, those air, the reserved variables in auto lease. Patchouli. So we'll see that 20 national. So I'd see you there. 17. 4: Hey, guys, let's continue building on our bars That l s b in this tutorial, we're going to discuss about the reserve variable or the pretty fine off the least variable called the Boss. So it was suggested not to use the the variable the pretty find variable in our program that say, Do you sing like that? And the sense of value? This is not recommended because the past has their own purpose or their own specific usage in not going not on these. So let's great and the new program to show how the past is being used in police, for example, we create a new program called Ln for a Line used to draw a a simple line. So we used that for the user input, actually. So we command line, then use the pause. And also another this. The first pauses for the first point. Second pauses for the second point, and then we enter and that's it. The new line will be created for us. Based on these. You, sir, points the first point in the second point. So let's save the spire loaded. So we now have Ellen Command. Be assured that command see specify prompt us. We'll specify the first point and then specify the next point. And it draws line for us. That's how the pass is being used. Okay, so let me illustrate that one. Ah, 11 more time in inserting a bluff, for example? Yes, said Mr Zero, their current zero. That's quickly create a A block. Here's circa the ninth of here. It was just our sample block when we created that called B one by the center point of the block, the center of the circle coming the instruction point of the block. Okay, so, no, we have a B one block. All right, let's create a new function called, uh, difference one be. I mean, I be insert block and let's say we prompt the user with look. Name to insert. We use the same get string function inter block name, then command insert. Then what is the black name to insert? We supply the block name here, Mark variable block name and pause these for the yusor a big points of the insertion point of the block. Then just enter enter to accept the people or the irritation and girls and so on. And that's it. So let's save this pile unloaded. No, we have heared I'd be function insert block So let's secure that one Now we're prompted with the block name So we have the block name called B one. Now, this is not the past that's executing, so neither waits for the user to pick the insertion point. There you go. So that's how the posses use in our code. Okay. Very straightforward. That's why you never use this one. Yes. Your variable name seats reserved Pretty find variable in the next video, we are discussing about another pretty fine variable called T as true. We will use that in a while. Loop so and see you in the next video. 18. 4: Hey, guys will come back. This is our last video for the variable Siri's. In this tutorial, we're going to discuss the really find variable called T these. We find us a constant variable, so we will create a program to show how to use that variable T. Let's create a new program code. Uh, Prince Numb, what do you find? Function? Bring them basically, just looking through the numbers, using the wild and checking the the value of the counter. And then if it reaches the the limit, then we will accept the look. Okay, so let's create a new variable called flag. That's true. This also create another variable called counter or CTR and initialized that value toe one . Then we're going to use the while function. So while flag means well, true, do the following code. So we are going to value added the value of the counter every time we look true, the the process. So let's say Well, counter is less than 11 for example, so basically we're just limiting it to 10. Limit our code to new to display up to number 10. So if the counter is less than 11 we will, uh execute these code black. The program is just used to basically ah, interpret the Siris of expressions into one single execute herbal block. So we re we will just different the number, print the value of CTR, and we were increment the value of the counter with the use of one plus Okay, don't worry about all these. We are going to discuss this in further details in the coming videos. But for now, the main embassies is in using the flag that true? You know, our program. Okay, so if counter is less than 11 it will always be true. So it would execute all of this two nights here. Okay, It's a program. Basically, just group is too less into a Siri's. Uh, no sequential statements. We don't have the program. Let's say yes, it doesn't exist. Translation for these is your country is less than 11. Do this one otherwise do this light, okay? And that is not the objective of our code. So that's why we need to program to execute this two lines of God into a single blood. So if countries less than 11 duties otherwise we're going to set the flag to meal which means that if the counter is already 11 set the value club to meal and then the world well , except it's no longer valid, sir. Just existed. All right. First the if statement and we're going to remove these extra lines. Just hear another principle. Clean execution. And that's it. Let's give this when they try to save the file and we now have in your function called drink them nets. Run that two. There it is. Some see the results. We keep looping until we we reached 11 until the counter has ah value of 11 and come 11. It's less than 11 which is no longer true. We're going to set the flag to meal and this wild statement here, it's no longer valid, and it will accept the loop. All right, while it is valid, it just keeps printing. The value of city are counter, and we have from 1 to 10. Okay, so that's about for our variables. I hope you have now a good grasp of its usage. And maybe you can think up some the other functions that you can develop on top. This is a sample code that we had In the next lesson, we will explore the math functions. I'll see you there 19. 5: Hello there. In this lesson, we will learn Italy's commonly used Matt Functionalities, the Italy's past. All the math functionalities that we can utilize for our calculations can be a simple one or can be as complex US needed. Be. Commodious functions are as follows. Blast sign reached just adds to numbers or more in the list. So in this example, the sign is always the first, followed by the numbers to be added. So seven plus five stroke. In the second example, we have multiple numbers within the least, and then they just all add up to a total of 38. The minus sign substructure say number from another number or more so the sin taxes. Ah, my minor sign the number to be subtracted and the number from so there saw this. Eight eso If we have multiple numbers in the least, we can interpret this. US. 20 minus 3 17 17 minus four, 13 and 13 minus five is eight, and the asterisks sign issues. Former complications us. With the blessing minus, you can will reply two numbers or more in a single list. The division is the forward slash which issues to divide two numbers in the list. You also have the tribunal metric functions. You have the same function here, returns to sign up on angle. That's a riel expressed in radiance. So the same taxi is signed. The angle We're anxious the value of dangle. Same with the co sign. So this is the same cops coastline. Tango were angle. Is the value a ton register art? Onion of a numbers Reagan's square of Mrs Industrial Square. Just type in sq rt than the number Some problems scary. The 49 with seven. We also have miscellaneous math functions. This one is the increments function. So basically this is the syntax one, plus the number It increments the number by one. So in this example, here basically we increments two with one So they saw this tree. We also have a creeper that be crimen operator So one minus number in this case 20 de crimen by one. So it's 19. We can also do a combination off much functionalities in our calculation. In this example here we have to lists of expressions so they are being calculated from the inner expressions first, then going out. So in this case it multiplies four and five first, then we have 20. Then we had three. In this case, we have a 23 in this example. Here we have two lists of expressions and we have here the territory that divide. So whatever the product here and the total of this expression, this one will be divided by this expression total here. So for 10 times four reaches 40 divided by four. And the answer is stent. There are a few more much functions in Ottawa. You can find them in in the website. Just searched for police. My functions man should be displayed with this results displayed on that one. You can see all of the completely stuff of math functionally this year. So this one on the basics ones we discussed there is also this bit twice off period or the increment in a decree meant we discuss. It's so cities absolute function most nights, the exponents. So there's a lot of these fixed function which, uh, converts to the nearest smaller number. And if so, we have the greatest common denominator and so armed so you can refer to this run if you have some work complex calculations or I need specific personalities from here. Your search for the desk, I mean the least month functions or functions. So that's about it. In this video, we will explore. It is in AutoCAD in our next lesson. That's you there. 20. 5: hi guys. In this lesson, we are now going to try all the malfunctions that we've learned from the previous videos. So that's get started using the addition. We just have to do like this glass. And the numbers that say to the streak was five 3.4 6.7 just like that for the subtraction . Just do the minus sign. Read the number to be subtracted from and the number that chuck it. 15 okay for multiplication used the asterisk to multiply where there were a number you put in for division. This is just the dividend and this is the device or this. Say 2.5. All right, so this is how the the for me that works or the symbols works. I would like to point out in division that you have to always put in a numerical number or a decimal number. For example, if we have 18 derided by for, for example, it gives us four, which is not actually correct, because this is considered US division by into a year where just returned the whole number . So when you are using the division, make sure to include the decimal, something like that and gives you the sorry 18. Divided by 4.0 gives you the actual results. All right, we can do ah, complex calculations. However, we want C four times five and 20 right by 3.0. So in this, expressions were actually adding the product of this person expression to the results of the second expression. So really give you the results. Based on these proceed INTs, it always goes. It always comes from the inner expression to alter expression. Right now, if you use the anger, that's a sign of 30 degrees. It's negative 0.98 or betrayed the coastline of 45 degrees. It's 0.52 You can try. The art dungeon of Dean gives this one point by or the square the square of, uh, 47. Scared of 49 seven. Okay, No. Other than these calculations, I would like us to create our own compilation off conversion formulas, So that's great. Ah, a program called converters by writing a code convert specific requirements. Let's say, for area conversions, we were just great. A simple programs to start nous a recreate the function Cold acre to Hecht ours yesterday me a c R you can rename however you want will make use off one off the list functions called Get real. This one will allow us to accept from the yusor to enter the value off acres and restore that in a a c r variable. Okay, then Well, great. Another variable called result that will hold the the product or the result of the calculations of the conversions. So the formula to convert the acre to hectareas the value of acre times 0.4047 So these our results next I mean just from the user or message the user by doing a string concatenation . So really to string this another a police function the acre this acres will convert it to Hector becomes now the real three string result. Hector's okay, that saved the smile. We call it converters that l S B it's noted. All right, so we know have one function called a CR to Hector and their acres. How many acres you want? Let's say if you've been acres, it is agreeable interests, explains their 705 hectares. So this is very simple program, but it is very useful. Let's say we create another category here for all the temperatures conversions that school dysfunction firing height to sell cious. So we do the same thing. We ask for the value of firing high, to be converted to suspicious, reduce the same function, get really function and they're firing height. Then we also store the results to the result Variable. The formula for conversion from Fahrenheit to Celsius is subtracting 32 from the firing height value and then dividing it by 1.8. Then you will prompt the user or message the user with the results really to string Fahrenheit It waas realtor string result Celsius. Okay, this straight to save again. It's that it should be our Realtor stream. No, that there is an extra parentheses. So should only be to those are two common errors that you get when you're recording. All right, so we now have the firing. Had to sell shoes that's execute death. I say we have 75 F. We have now 23.889 searches split the space here. Okay, now let's do another conversion this time from centuries to firing High said you so get tria. Enter fire tonight I mean said she's sec. Your result. The formula to convert from such is too. Barron Height is adding 32 to the product off self use value times 1.8 and then the real message, the user Realtor String said she's value. It's pretty violent, too, Really to string result for a night. Okay, that save our code? No, it again. Now we have this searches to firing head function Intercession is that say 18 degrees are 18.5. We have 65.3 party night, so you can build upon these code and keep adding some small functions. Let's add one more category two calculate. Let's say for the weight formulas that's called these, they're fun. See K G £2 kilograms, £2 said You cause de used to get three of function again enter kilogram, said Curie. Salt The value for the result is I mean, the conversion for kilogram toe punts is multiplied kilogram by 2.205 Okay, and then we'll message the user string concatenation. There is this trinket of brown k g disagree with it, too. Result in pounds. All right, let's save our code and noted Now we have kilogram. £2. It's straight at one. How many kilograms? Let's say 10 kilograms. 22.5 when we're time. That's a you raid. 67 kilos. You are 14 to 7.7 £35. All right, so that's about it. For this lesson, I would like you to keep building when top of these codes, by creating more formulas and then you can have a compilation of your converters. All right, I'll see you in the next video. 21. 6: hi. In this lesson, we will learn the list functions. There are quite a number of functions in utterly that are used to manipulate a least. This functions can be retrieving. I attempts substituting, I attempts looping through the items or even reversing items in the least and many more. We will go through each one of them and be familiar with their specific functionalities. And in the practical section you will see how they work in action. Okay, let's start with the car function. This function returns the first item in the least, so the symptoms. It's very straightforward. We have here car, and then our least is any valued least So, for example, we have at least off characters A, B, C, and we issued a car function. We just returned A. It's the first time in the least in this example. Here we have at least two lists, so we issued a car function and it returns the first list. From this least. Also, we have a least ah strings and then into your we should the car function and it should return the first item in the list. In this case, the listener popular world. The next one is to see the our function. This function returns the remaining items in the least after the first item while the car is returning the 1st 1 The CVR turns everything in the least after the first element. So in this example here we have released stuff. 379 We should the CPR and it be rest the seven and nine Mr Same thing if we are lying it into a list of least give us the second list from this ah list of mist. The third function in the a c a d r. This function returns the second item in the list only the second item. Unlike the CDR, it returns everything after the first bite them so that c A D r it's just returns to second item. So the same time same us the 1st 2 So in this case, we have released off integers for six and nine. So we issued the see A Deer command gave us the six second element Another example that we have here the list of strings The c a. D. R of this list is the 2nd 1 which is how in this third example, we have, Ah, three lists within the list. So the second item in this list is a list of ABC. So it is the return. The fourth function is C A D D r. This function returns the third item in the least, So we have your lease off. One for six gave us the third element. Another example is the least of the string. You know, their friend. And it gave us the third item in the least. Also, if you're manipulating a list of lists Well, listen. 123 ABC. John Michael 789 It returns the third item in our least the 5th 1 E c. A. R. Function. This function returns the first I time of the least. I mean the first item off the first least item in the least. So, for example, we have here a list of two least of numbers. So by definition, it returns. The first I tear up the first list item in the least. So the first item in delicious this one here, the one poetry and returns the first item. So we get one. Okay. Another example is is we have to list strings. So this is our first item first least. And this is our first item in the least, the next one is See DDR. This function returns At least that includes everything after the second item in a list. So we have here at least ah, characters, character strings. So it returns everything after the second item. So 1st 2nd say treatise CNB, we just the third in the port. Another simple is we have here at least up numbers. So it returns all that items in the list under the second list. So we have here 387 In the next lesson, we will continue with more list manipulating functions. I'll see you there. 22. 6: hi guys. Now that we have a basic understanding of the Italy's least functions, let's ah further explore them in AutoCAD so that we have a better understanding because this is very, very important. Let's start with the car function. The car function returns the first item in the least. So in our previous example, we have the least off characters, ABC. And when we issued a car command, it should return the first vitamin released, which is a escape that I try. Correct. Another example we have is the car off a list of lists this off 123 in another least off 987 So we have two items in our least. If we issue the car common, it should return the first item in the list here. Yeah, Another simple we have is the car. Hello world. It's a list of a string. And then, huh number five anger. So I would like to assure you how the car really interprets the least. Let's just great one line here, and I would like to get the definition data that line and get up and last. Don't worry about this for knife. You don't understand this yet, but this will be covered in the next coming to sections. But for now, I would just like to show you how we can retrieve the definition data off objects. So endless is to retrieve the last, and it be defining the drawing and get is basically getting all these properties. All right, so let me show you how it is being constructed in. Ah, file base, This one here. So if I have to break it down into an individual line for the least, I think it is much better for you to understand how it is being constructed. And how can we manipulate them? Okay, so this is the line property, and this is actually similar to the one we have year. We don't need to issue the car. Well, we're interested in is the natural least try that. My attempts in the list. All right. That described. Added to we have do the low over number five. This is the first item in the world the list up in the world and number five, all right. And the other one is, uh, mist of two lists. I think this is the second example. Okay, So when we issued the car command for this list. What we get was a because he's the first item in the least. When we issued the car command in this list, we got the 123 Because that's the first item in the least Also. Similarly, when we issued a car command for this list, we get the lowered right. See? Car of ABC. Good day. Car up this list. We got the one to treat Corp in the world. We got the hello word. So we apply that into the actual ah Lyon definition data, which is this one here. So this is exactly the same as this'll. Least it's just composed off the except code and the value. So in this case, if we issue a car off this command and get an ant last Okay, we should be getting the first item in that. This which is this one? Skip that. Try. See that? That's how car works. Gives us the first of sorry. Gives us the first item in the least the first element from here yet That is how car works . Okay? It just returns the first item in the least, nothing more. So no I hope you have a better understanding on how our example works. Bye bye. Breaking it down into a more readable format. And then now we can understand why we got the A and you get the 123 And they got the hello world seen with our leading We got the entity Name of the line object. In the next lesson, we're going to explore the CDR function. I'll see you there. 23. 6: Hi guys. Let's discuss the CBR function. See their function returns the remaining items in the least after the first item. So in our example, we have CBR off the least 379 So, by definition, it should return the remaining item in the list after the first item. So we should be getting seven and nine. Does the remaining items in the least after the first item? Let's see Like this. All right. Good. So we have seven and nine us expected. Another example we have is a list of two lists. First, this is the least off numbers 135 and another one is these of characters of A, B and C. So since we only have two items in the least, it returns the remaining item after the first and item in Delhi. So we have a B c this correct no going back to our example or the land definition data. These are, for example, you just get rid of this and let's replace this one there in the other example, which is the best of to list. Okay, so we've seen that it returns to seven and nine because those are the remaining items after the first item, and similarly with this example here is the remaining. I think that these so now applying it to our definition data for the lion earlier, we should be getting the rest of these items because these are the remaining items after the first item in release. All right, so let's give that a try. City are off and get and last see. Let's start with the the Lion Association list. Reach is exactly what we have here. We go studies the remaining item in the least, so I hope it's getting clearer now because it is very, very important to have a so lead understanding on how we manipulate the least. Because in our coding in the later part of the Victoria's, we will be dealing mostly up is I'm a policed. So having a solid understanding off those list functions well, really help us easily great the program and manipulate whatever properties off the anti peace we are interested in. All right, so in the next lesson, we will discuss about the C A B B R function. I'll see you in the next video 24. 6: Hi guys. Know that we understood car and CBR function. Let's discuss now about the C A B R function. It is basically the car off cdr. So that function returns the second item in the least. So let's see our previous example We have 46 and nine. So the car of CDR CBR is the remaining item in the least after the first item. So this is what we have. So, getting the car of that, we just give us the first I think that least Okay, so we should be getting six. By definition, it says it returns the second item in the least. Yep. Got six. Another example. We have waas Ah, list off. Hello. How are you? Forget but in the list. See, it returns the second item If we also have a least off least and we get the c c A. D. Are of that we have here the least of 123 another list of characters A, B and C in another least up names. So we should be getting the second item in the least, which is the ABC. All right. We know. Apply the c a d r into the definition data of the line from our previous example. Let's get rid of these. So it says the second item in the least, he's the first item. So these a second night them. That's why it's called C a d r. Because it's actually interpreted us the car off cdr these our car and this is our CDR. So now this is becomes the primary least. So if we get the car of these, we get this first, I think which is the A situation in this airplane? Okay, this how you read it? The car up cdr. If we now apply the CED are into our and get an ant lust to mud, we should be getting the light. Here you go. So that's it. Once you have a good understanding, it's it's become second nature to you. Very easy to interpret. Now, how is the AutoCAD data model is being just pleaded or retreat from all of these based on all these lists functions. All right, so that's how c 80 our works and see you in the next video 25. 6: Hi guys. Let's know, discuss the C A d d r. Function. The definition is, it returns the third item in the least. So in our example, we have c a d d r off the least one or in six. So it should. He should return the third item in the lease, which is six. Another example. We have ISS see a DDR off. Hello there, friend. That's the third item in the least. Another example we have you see a d d r the list of 123 and the list of a Be and Carter C as well as least up name John and Mike. And another list numbers 789 So it should return the third. I am in the least reaches. John and Mike. One more parentheses. Yep. So let's translate these again into the definition data the line from our previous example . So these our definition data. So it should give us the third element in the list, which is this one here. So see, a DDR. It's basically interpreted a scar off CDR Hope See the are okay, so it's get the cdr of this least we have the star. Let's get again. The cdr off the least. We just this once. No, let's get the car. Which is? No, this one. All right. So you understand now how it is being interpreted with all this. Come on, it's a car up. See, the are of CVR, which is the third item we know this its the third item, but it's still better to have a good interpretation off all these combination of these functions. All right, so let's see how it works. C a d d are off and get a can't last the third item into these, which is this one. Okay, nice. So in the next lesson, we're going to further explored the C A r function. Let's see you there. 26. 6: Hi, guys. So see a a r. How does it works? By definition, this function returns the first item off the first police item in the least. So let's let's have a on example. We have a previous example of C A. R are policed of 123 and 789 So we have a list of lists. Okay, So what does it return returns? One. Why is that? Because it says here this function returns the first item off the first list item in the least. So that's have a good inter the translation for this. Listen, our not but here. Okay, so c a r this has translated us car off car. Okay, so in this list we have if you get the car of this list, we have the car, we have this 123 and then we get the car again. Of that, we have one. That's why we have the one here. All right, So it returns the first item off the first list item in the list. Use the first item in the least, and it returns the first item. That's why we have one. Another example we have is C a R list off. Hello. We're people. And another least, uh, characters were there. See, we have the hello. Because this is the first list item in the list, and it returns the first item. A test of that least which is Hello. Okay, No. If we apply the command into the definition date of the line and get let me just get, uh, definition Date of the line is what we have. So can you guess now what is the return value if we should see a are C A r o and get. And last, this is our first item in the list. The first list item and the car of that reaches minus one. You should be getting minus one. See for correct. Yes, we are. So here these our list, by definition, it says returns the first item off the first list item in the least. So there's the first item in the list. And what is the first? I don't want that minus one. It's the car car. All right. In the next video, we are going to explore the last list, function with all these car and see their combination. Which is the CD? The are. I'd see you there 27. 6: Hi guys. Let's now discuss CBD our function. By definition, this function returns At least that includes everything after the second item in at least So in our example we have a list off characters. So it says it returns. At least that includes everything after the second item. So after the second at them is cnd So we should be getting CNB correct. Another example we have is at least off numbers. 1238 in seven. So what is the items after the second? I think we have 387 So we should be getting knows through three numbers, Correct. Now if we a play that into the line definition data What we have here is this list So it says it returns everything after the second item in at least which means from here we should all be getting all this so c d d r is interpreted us cdr off cdr So if we have played the cdr of this least, what we get is this least and then we have play again to see the are up this new list, we now have this one, which is that is the all the items in the list. Update the 2nd 1 Okay, so we should be getting all these. See, Siri. The are off and get up and class night. Say start from 330 reaches this money. Okay, so we're done with all these least functions. Part one. I hope you now have a very good and they're standing up how all of those function works in the next videos will further explore some of the other least functions. I see you there. 28. 6: hello. In this lesson, we will learn more off the list functions. They are as follows list cons and and for each functions, let's start with the least function. Basically, this just creates a list. Use the syntax least and expression. So let's say we wanted to make at least out of these three numbers. So we just issued the list command or list function, and it should return. Ah, list of 123 Same thing with the second example here we have a serious off character strings , then reassure list function, and it gave us the list of ABC. This example. We have, um, least off three lists. So we issued the list Command it give us gives us that the least of these individualist items here. The next function is the cons This function had. That's an element to the beginning of a leased or construct a that at least adopted pair. So these the syntax cons A five gives us the A. That five is the that pair these air basically an an atom or just a single object if issue a concept seven and nine gives us $7.9. These are all that at least or that it pair if we have a at least an existing list and reissue cons function with a new a character, for example. It adds to the beginning of the least in this case, have BCD and it as a so This function adds an element to the beginning of at least so that's about for the cons. Next, the end function. This function returns the end item in the list. Zero is the first item in the least, so here's our soon toughs and the end the index and the least, so index value starts a zero. So in this example, if we issued and three of this least means we will get the fourth, I think because the least starts 00 one 23 so should give us to be. The best example is we have released of numbers, and we issued N zero. So this is the first animal zero, which is one. The next function is for each function Dysfunction steps through and evaluates expressions for all members of released and returns the last value. So there's the syntax for each the name and then released. So here's our first example somebody for each, uh, n or you can You're any variable here for each end and then released. So in this case, we process this list and this is what we do. So in every 1/3 iteration, off the least we print the element in the least Say this case, the first it's aeration prints, the a second declaration prince to be and so on. Same is true. With this second example, you have a series of lists of numbers and basically we look through each. So for each of these items in the list, do this. So in this case, we're just printing each of the element in the least. So give us 12345 So that's ah, about for dysfunctions. There are a few more this functions and we will discuss them in the next media. That's you there 29. 6: in this video, we're going to learn how to use the list function list function. Just basically greats, at least. So, for example, we have at least 12 three, gives us a list of 123 and say we want to create at least. Ah, characters gives us a visa characters. Let's say we wanted to make a list A policed. So let's say we have here at least up 123 and another least of four 56 Another list. 789 This will give us a list of three list, so that's just about it for the least, try it out. 30. 6: in this video, we're going to learn how to use the cons function. This function adds an element to the beginning, off at least, or construct a that at least, for example, we have here the guns. A five. It returns a five. It's that at least another example is, let's say we have record seven and nine. It returned 7.9. Let's say we have here more complicated. Least cons missed up a and least of B and C de. So it gives us a A B C D. The value returned depends on the data type of police or athm. A policed or Adam is a least. Cons returns, at least with new first element added as the first item in the least, the police star Adam is an atom. Cons returns a dotted pair consisting of new First Element and least or Adam 31. 6: Hi, guys. Let's know, discuss the end function. This function returns the end. I time in at least zero is the first item. It is zero based index. So this take a look at our example. We have here three and three off our list, which is a B C d. E. So let's count we have here five, but by definition it starts from the zero index weakened. Zero is the 1st 1 0123 So we should be getting the D. Yep. Another example we have is n zero off. Oh, are least of numbers 1468 and nine. So in this case, we should be getting the first item in the list is zero based index, which is one. All right, so if we now apply that into the line definition data and get, uh, and blessed So these iso our definition data, we should we have here if we a play now that and into the least. So let's try retrieving the third item in that list. So we should be too, because zero based in the 012 So that would be the third and get up and plussed this is what we've got. That is the third element. Regis, this one here. All right, so in overseas us the flexibility rather than using the c a d r or C d d r r c a D D r and function gives us the they not me kind, off list manipulation where we can just specify which index we want. So let's say we would like to get these layer property 01 23456 and seven. That should be seven. So issue our in common and we put here seven. We should be getting the layer, which is the number eight association least we are under layer zero. There you go. Okay, so these seventh, these the eight is the night that 10 and a truck. Let's say we would like to get the starting point later on. By the way, we will discuss all about this group coasts that the except group codes. So don't worry about this one. For now, that's just focus on list manipulation. So 10 is actually the starting point, and 11 is the end point. So if we want to get the 10 the starting 0.1012345 6789 So it should be the end nine. There you go. And, ah, endpoint should be there. 10. Okay, so that's about the end function. You have less of flexibility there, but just be careful and remember that either zero based. So it's always started. Zero. Okay, let's see you in the next video. 32. 6: hi guys will come back. So for each function, how does it work? By definition, it steps through and evaluates expressions for all members off the list and returns the last value we have an example of, at least where we issued for each command released off letters A, B and C. And then we included the print function to print the value off each element. So basically it steps through, each off the member inside the least, and then this is the part that executes it. Whatever you can to find any function in here. For this example, it's just use the print function, and what we see is A B C. And it returns the last value that we can suppress the last value by adding the friends seek remand. It's basically for clean out, so we only have a B C. But let's focus on this for each function. So it's just steps through each of the item in the list, and then you can add extra processing here. Whatever. Miss your requirement. Okay. Another example we have is for each and off our list of numbers we also used to print and okay, strays. My Sorry go. We have 12345 Let's also play this one too. The definition data of this land, for example. So we can do the same thing for each end, and we will get the list off that land object. We do the same thing. Let's say prince and then currency. So we have at least here and that it's just steps through each of this item and then runda the print Common. Right? So it shows like this First bus, second class, third pass, and so on. These what you got this will be very useful when we are or when you are working on these very process of a Poland pouring something that you can look through each of the Vertex and do anything about that. Mm. According. Okay, So that's how for each work. Very straightforward. Just have ah, good understanding off the function that it just looks through. Whatever is in the least, All right, 33. 6: Welcome back. In this lesson, we will learn a few more list functions that are very useful in other this program. They are as follows. I saw sacristy last and reverse. Let's start with the ASA function dysfunction searches on association least for on element and returns that association list entry. So this is syntax. Assad is our listen the element. For example, we have here a at least off lists starting on LST variable who is our first least named John Age 25. Height 6.0. It issued ah, Assad H LSD, which is our list. It gives us the association list off the age which is aged 25. So they say we put here I saw name LST. It should give us the name in John. However, if you specify on element that doesn't exist in the least, it should returns. Neil. The next function is sub sti or substitute. This function searches a least for an old item and returns a copy of the least with a new write them substituted in place off every occurrence of the old item. So there's the syntax sub sti new item, then the old item to be substituted and our least. For example, we have a list off a B list of C, B and E in the story in the variable LST If you issue a sub ISTEA function with the new item, which is B B and the old item is be in our list variable, he should return us that the new at least with the substituted value. So basically, in this case, we are substituting the B where the BB. So now we have a, B, B, C, D and e. Another example Ease. You're substituting the value of CD in the list with an X, so I should give us a B we just a B and substitute the value of CD with an X A B x d. Okay, the next function is less. This function returns. The last element in the least symptoms is very straight forward last LSD. So in this case, we have a list A B C, and it just returned. The last element in at least reaches to see same is true. We have a least up lists. So in this case, we have ABC and every list of the E f. And this is the last element in a list. So it returns the another function. These the reverse function. This function returns a copy of the least, with its elements reversed. So it's just basically the reversing the order of police. We have a least ah, off ABC, for example. And we should. The reverse commanded just reverses it from a B C D c B a. So that's those are all the least functions we will explore and see all of these lists functions in action in the next videos. I'd see you there. 34. 6: Hi guys. Let's know, discuss the Assad function. So the definition of a saw is it searches on association list for an element and returns that association list entry. So in our example, we have a least the following lists. We have the name John. We have the age 25 we have also at least of height reaches 6.0. So these our least which restored in and in the LST variable if we know used the A supplement. In that least, let's say we get the association list off age from the LST variable. We've got the age 25. If we get the ASAC off the name the association, this of the name from the LST variable, you get the name John. However, if let's say we put with here which doesn't exist, we should get a Neil Value. Forget the height which exists, and we should get the success of this of the height. Okay, Now, let's apply that into the definition data of the line. Well, I'm here The line. Let me get the association lease of that line I restored. Ah, I mean, let's get the definition data. That line. Let me start in the variable A and get off and last. So these now our A So all we have to do is specify the first element. Basically, it is the key. So if we get the assault, uh, let's say the handle number five. I saw fiber A. It should give us the association list of five. If you get the starting point of the line, reaches the 10. All you have to do is association least up in from our variably. That's that's how easy it is. All you have to do is specified the the code or the D except group code. Let's say for the endpoint 11 we have to do is association 11 off our variable. See, that's it for us up. A simple is that? 35. 6: Hi guys. So substantive function or substitute function. What does he do? Dysfunction searches a list for an old item and returns a copy of the least with a new item substituted in place off every occurrence of the old item. Miss seven example. So we have identified the variable LSD with this A body you here C, B and E. So we're setting this list into our variable LSD. That will be our list to be manipulated. No, If I issue the sub sti sub stick a man our function and I replaced the B with the that will be from the L'Est the variable. So all of the occurrence of B will be replaced with B B. In this case, we only have one. So this weather it will becomes BB. That will be Yep. Let's do one more thing. LST let's substitute value. Uh, the list CD with the value of X in our enlistee variable. One more apparent. This is here so this currents of CD was replaced with X. Okay, Now how does the subsidy it works if we apply it into the actual definition data off the autocad object We're here. Line. Let's try substituting the layer of that language with the new layer. Let's just list out this is currently in layers. Zero. Let's see how many layers we haven't is drawing. We have another layer called stare with a red color. Let's replace this line layer from zero to stare first. Let's get the data definition, said Q A and get up and list. So these our definition for that line. Okay, this is the one that we are interested in replacing with. A new value is the layer. So all we have to do is set a few A substitute. What? This our new value. So how are we going to compose this association? Least? Remember the cons So we have to do is issue. The concert will be constructing a dotted pair so eight off our layer, which is the stair. Basically, we are mimicking the way this eight that zero is being constructed with this. Ah, it's stairs. So it will return us Adopted Bearup eight. That stare and we are replacing the this association leased to remember the assault. We are using that here ASAC up eighth off the A and we're doing that from the variable a list. OK, let's try that when we're parentheses. Now we have stare. But there is one function that well modify the definition data from the article database and it should always be used when you are using the service stick a month so that whatever changed you made in in the definition data, it will be saved into the AutoCAD drawing database. So we have to used ah and mud common or in mud function. All right, let's do that. There you go. We know have here this stair, and at the same time, it reflects into the drawing database. So that's about it for the substitute. By the way, before I forget, there is another function that always goes after the end Mud, it is the end update. The purpose of this is to just regenerate the drawing in the jihad window. So we have to issue the end update of endless. All right, so in the next video, we're going to discuss the last function. I'll see you there 36. 6: Hi, guys. Let's quickly discuss the last function. The definition of last is it returns the last element in a least. So we have here the example of last off our list, ABC. It should return. The last element reaches C. Another example is last A B, C D. I mean, ABC and the list of the F we should returns the last element of the list, which is this list here. All right, so if reinvestigate the definition off line, this is our last. Yeah, either in the least to 10 is the UCs scored in it. So this we should get these list item if we issued the last command from the least let me get the They're finishing data and is stored in the variable A and last. So these our a This is our last element. If we issued Antle s command of least a we should get the that endless It should be last. Sorry. Yeah, that's it. Very simple. 37. 6: Hi, guys. Finally we reached the reverse function. These our last function from the AutoCAD least functions. So what is the reverse function? It returns a copy of a list kids elements reversed so us the word itself reverses. Just reverse the items in the least. Let's have an example here we have a list off ABC, so by definition, is just reverse it from a B C. Two c b A. Here you go. Same thing if we apply that one in the definition data of the line necessary used the and get off. And lest any story in the variable age, this is our data definition. And if we reverse that, let's say said Q b, reverse A. Here you go. So now our to 10 is the first item in the least, and the entity name is the last item in the list just reverses the order. This is very useful in same thing in manipulating the or the line object with its Vertex Ready says, if you want to reverse the direction of the holy line, you have to use the reverse function. All right, so business the reverse. Now it is the first element Second is 11. The 10 the 100 the eight. The layer before 10. More than space 67. 100. Handle. There you go. That's about it. So and see you in the next section. 38. 7a UserInputFunctionPart1: Hi guys. In this lesson, we're going to learn at the least user input functions. They're quite a number off user input functions in our police, and we're going to, ah, discuss each one of them. Let's start off with the get point function it buses for user input of a point and return to the point. The symptoms for the good point function is open parentheses and then get point. This to arguments are optional. You can either and thirst the point with a message, or you can just type in the get point directly if you want to start in the variable with the other way. Uh uh. Using the good point conscience Knees two provided a message. Let's say pick the starting point for a line, for example, And then you can issue the 0.2 with the Wright Brothers 2.1 so it gives you a robber bonding effect. So it's very simple to use this father one of these synthesis here, and you should be good, by the way, all of dysfunctions. We will try it out in AutoCAD so we can see how they were. The next function is get in it pauses for user input, integer and returns that imager. The syntax is just about the same as the get point, except that it has no optional parameter for the point, only the message. So you can either issue to get in command using this syntax, or you can provide the user with the message. Just come some kind of guidance that they should input an integer value because get in Nessen except any other characters, except in three years for home numbers. Next one is to get string function it bosses for use for input of a string and returns the string symptoms for that is, get string with the optional um, parameters. Here are optional arguments see Re's T for True or Neil and the message. Whatever message you want to put in. For example, we asked the user to enter a layer name, and we start that value into our str variable. We can also use the optional parameter here with a T, which means that we can, and third the the full name with a spaces so you'd accept the space rather than interpreting it as a return. So we this theory are allowed to death the next function is get really. It passes for user input of a riel number and returns the rial number same with the get in function. It just accepts an optional message. So get real and optional message, or you can do the same things get in. So just to store the value, whatever they use during what's it returns a numeric or double. Or you can use this one with the the message. So this is the first part of the user input functions. In the next video, we will Kober a few more of dysfunctions. I'll see you there. 39. 7a UserInputFunctionsPart2: hi guys. Let's continue with a few more other lisp user input functions. Other than the 1st 4 that we have discussed from the previews video, we have a few more. One of them is Get this function. So these process for user input off a distance, the sin taxes get this an optional point or message parameter you can issue to get this command like So so the whatever you, sir picks on screen me to capture the distance of those two points. Or you can provide the optional point parameter from 00 and then you will be just prompted to pick another point to get the distance. Or you can just directly specify the distance by providing a message in optional message parameter. Or you can use to get this with both of the optional parameters where the base point, let's say, from 00 and then from for the distance, How far is it from 00 and then the value will be starting into this variable. Next is the get corner. This one poses for user input of Eric Rectangle, second corner. The syntax is almost the same as to get destruction, so it's should be get corner and the optional point and messages parameters so you can get the corner point from these reference point so the corner point will store the the other opposite corner for a rectangle. Another way of assuring the get corner function is to provide a base point and the prompt or a message to pick another corner the corner Next function. These get anger. This function causes for user input up and anger and returns that angle and radiance the same taxes similar to get this and get corner as well. With the optional point and the message parameters, you can just ah, type in the get angle, or you can provide the base point of reference point and the message. Next function is the get keyword. This function pauses for user input of a keyword and returns that keyword the value so the symptoms is get keyword and ah, message. However, get keyword has one more. I used has one more required initialize values using their in it get function. This always comes with the get keyword function. So let's say we would like to capture the the user input into an ant's variable. We should get keyword like these, which means that only in the initial initialization value is allowed in this he would no other value would be accepted. So we will further explore all these functions in the jihad. In the next lesson, we will provide more a sample so you can have a better understanding off this functional it's see you there. 40. 7b Getpoint: in this video, we're going to learn how to use the get point function. Get point is very important in Natalie's as it allows you to interact with the user to pick a point in the outward window. You can issue a good point, the function in many different ways. 1st 1 is just by typing the common good point, and then you can begin on the screen. These our point another way is to provide the user with a prompt get fined pick up point, and you can pick anywhere in the screen these our point in other ways to store those points in the variable. Let's say we from the user with two points so we can draw a line in those two points. Let's start with the first point to say 0.0.1 gets boring big this starting point so you can pick somewhere here on the left. No toward the point to. You will issue a good point, However, at this time since we have the 0.0.1, we can include the 0.1 here that would serve as a base reference or some cry now, a guide like a robber bonding effect. If we I finished the command here. Let's say pick the endpoint and you can see the line that line and we can go pick anywhere on the screen. So here's our second points. If we check the value off 0.1 and 0.2, those are two points. We can now issue a command line. Bt one. Bt to then enter. Here you go. That's our line. So that's all about Get point. It's very straight forward and easy to use. 41. 7c Getint: in this video where we will learn how to use the get in function. Get in. It's used to allow user to enter integer value from negative 32,768 to positive 32,767 so we can issue the get in command like this SE said Kun. Um, get in and and you value from within that range of numbers. So we checked the value of numb. We have 45. We can also provided Prompt for the user. Let's say get in and in turn into your value se five so that this hour numb get into also has its own validation. Something like you. Let's say the user the enters of value babies no, not within the range allow value from minus 32 7682 plus 32 +767 Let's say after into your and typing, I think we have 32 7 69 Do you have prompt us to just entering number within that specific range? Also, if we typing any other Carter other than these numbers, let's see whatever doesn't allow it just be prompted with the requests into year value so until we typing the value into your value, then it will be accepted. 67 sour number. That's all about Get in function. You can use it in your program if you need a value from the range of numbers. 42. 7d Getstring: In this video, we will learn how to use the get string function it It's used to capture the user's input assay string. We can then use the value into our program. For example, we will prompt the user to enter layer name. Then we will make the player the current layer. If we look at the current layer now it iss zero. Soon it's say, Mayor the currently zero. We have another layer here called wall. Well, then make this kind player based on the user's input. So now that's issued to get string command. Let's say set you l name. Get string. Enter a layer name to make current so type in wall. So these our value So his name is well. We cannot issue a layer command. Come on layer, then the L name, then enter. So if we check the layer now, the current this wall see, it's very useful for debt. Another example is to prompt the user with the full name, for example. So let's say, said you if name get string Now there is a special character here. It's called T. This team means it allows the user to enter with a spaces So that's a enter your full name . John Doe. No, we can issue a from common, then string concatenation this name. Hello, then, uh, f name then we should princey just to have a Penis out. Hello, Jen. Dough. So that's just about the get string function. But remember, any character that this entered will be treated as a string. For example. Yes, they are. Get stream, enter a string and they use er type scene and she went to tree a number. It will be considered us a string. So the str values history any current there any value that's being entered into get string function will be considered this a street. So that's just about the get string function. You can think of something where you can use it in your program, for example, by setting the current land type or textile, and so on 43. 7e Getreal: in this video, we're going to learn how to use to get really function. It is used to capture Arria or decimal value. For example, said Que, But get really without the prompt, we can enter any value. That's they just four points 0.5, and our brothers before 0.5 get out. So for writing prompt like get tria enter scale after this explains my very simple it's our value. Or we can prompt for the irritation, anger, say M get trail interpretation ing and, let's say, 37.5. So those are just a few examples that you can use for the get to really function. Remember, that doesn't accept any other characters. Other. The numbers that's you typing anything. Do you always sprint you with the display saying Request numeric value? So if you type in an interview, evaluates it to it will always be translated into to be translated into decimal value. So that's just about get real function. You can think of a program that you can use this function, for example, number, conversions, calculations and many other applications that require large and precise values 44. 7f Getdist: Hi. In this tutorial, we're going to see how the get this function works. Basically, the get this function in other leas has an agreeable and function in AutoCAD. It's called this. So you can you specify two points and it should give you the the distance on those two points in this case, 2672 or to see 712 Okay, we have here the distance. So you seem to get this out of the school, man. You can. You can also do something like that. Pick the first front and pick the second point and show issued that. This that's but she moved the mouse. It follows and adjust the distance accordingly. Okay, so if we start the distance value in our variable, we can do like this. Get this. Then we select the first point and second point. So if we checked the value of this now we have 2.41 for 13 stubble checker. Yes. So that's our distance. Another way of using to get this function is by providing the base point our life at this point. So that's a get this from 00 These are our for this point. All right. See the rubber banding effect there, and they can click anywhere on the screen to get the distance. This will be our value. So the other ways to combine both the reference point in the message This I said, give this. Get this or you can even use the get point function here, Then provide the message. How far is this? Our value. Okay. Or instead of putting the get point, this one actually pauses unless re provide a problem. Make a point. It will show a prompt bigger point. Then how far? So we have this, okay? Or you can just store the reference point. First. Pt get the point. I think summary here is our point. And then we used to get this command based on that point. And then we will provide the message. How far? So it behaves the same way. Okay, so that's just about the get dysfunction. Very straightforward. Give me that try in the next video, we're going to have a demo of the get cornered puncture. I'll see you there 45. 7g Getcorner: Hi guys. In this video, we're going to usedto get corner function in our program. So the syntax, forget Corner is basically PT providing the base point or a reference point for the other corner. So let's say we can use the 0.0. That's our effort, this point. And now it will be even an option to click somewhere else on the screen with our base point us in 00 Okay, We can also provide a message. This sake corner, get corner that say we will use 00 reference point and then the other corner. Okay, so he ever does your zero and pick the other quarter. All right, So if let's say we create our program to draw a rectangle based on those two points, we can easily apply the corner function. So that's great. Our program, The fund. See that? Scotland a draw Red for a draw. A rectangle. Okay, so sit you. Let's sprung for the first point. This will be our reference quarter point. Good point. The first corner point. Now we can issue the corner point the gets corner function to get the other quarter. Let's make this a scorn. Our point get corner. Then we have here the when I press this point, which is our pity. And then our from Teoh Rectangles. Other corner. Okay, then now we can draw a rectum. Good command wreck tongue from first point to our corner point. All right, let's save this program as, ah, draw Wreck point nsp. And that's loaded. Yep. Always slowed. So we have now the function dro wrecked. So pick the first corner point ticket here and then picture of tangos. Other corner. There you go. That's our hunger. Very simple. So it just requires a reference point. And then I will give you the other corner. And then you can use that to draw everything. Good. Great. In the next lesson, we're growing to do a demo on the get angle function and see you in the next video. 46. 7h Getangle: Hi guys. In this lesson, we're going to use the get angle function in our program. The syntax for get angle is get angle something like that, and you can pick two points to determine the anger Can see dangle. It's adjusting accordingly. Okay, the return angle is in radiance, so this is dropped about 49 degrees. The other way to use to get angle command is to have a reference point. So let's say we have a 0.1. This just a big anywhere on the screen. So we're here. We really just This is our reference point for the get angle command. So sick you and get angle pt one. It's our base point. We can prompt the user which way. So she has a guide going. Where to? Point for the angle direction. Okay, let's create a program to apply these concept and see how it works. Let's create a program to draw a text because this program a dro text function. So let's ah, get the reference point first. Then my friends, point of dangle, get a point. Pick a night for this point, Then we will get the angle. Based on that 0.1 get angle 0.1, Pick a Anga direction of text, then remember the the return angle is in reagents, but the text command DP use. If we use that in our program, it except a degrees, not in radiance. So we need to create a function that will convert the radiance two degrees. That's straight. The function first define Ah, reagents two degrees and then the angle that we will be passing on the formula for that is the product of the angle times 180 degrees divided by pi. Okay, this also create the similar function for degrees to rad radiance and then the angle that we're going to convert us a. An argument. The formula for decrease The radiance is by multiplied by angle, divided by 1 80 degrees. So it's the it's the results of this division. People multiplied by pi constant by and that is our Reagan's. But in this ah, in this example, we will be using the radios to be Greece. Okay, so now let's convert this angle two degrees by creating a new variable. Let's go it dig for degrees and we call the function rad to the passing on the ang parameter. Okay, You might know these these function this that have a a c Something like similar is this one . This means that we're not going to execute this one in the command. It's just being called to convert. Oh, are radiance two degrees. We just need the result. Whatever the output is returned to us by dysfunction. Now we can We can prompt the user again with this start. Ah, start, start point of the text. Let's call that Bt X Good point. Thanks. Starting point. And then now we have all the points needed we can issued. Ah, gold mine text Just justification left. Then the it's starting point a text which is the PT X. Then the next height. This book, maybe 100 and then the text string, Let's say the quick brown fox. Okay, three princey. So let's quickly review our code. We have here the reference point for our angle and then we get the angle. Based on this point, you converted the radiance two degrees by calling this function. Then we prompted the use her again pick the Texas starting point. Then we drove the text based on this point and and and anger, but we missed the We missed the degrees here. So it is the text type and then the inclination angle of the text, which is the day. Okay, so let's save this file. Let's call it. Ah, draw text point sp that Ellis be save it. No. Okay. Over a slow the program. So now we can type in the cumin drove text. So we were We're prompted with the reference point and then big angle direction of text. Say pick something like this over here. 60. Rigorous. Then pick the text. Starting point. Let's speak somewhere. Here. There is this all right? So that's how you can use the get anger can come up with some other ideas were to apply that But be mindful of the requirements of autocad If you are drawing on object might always require a degrees. Like were example In this current text, it requires a degrees and the angle is returning in radiance. So you need to use this either of these two functions. Okay, so that's about it. Give you that try and that. See you in the next video 47. 7j Getkword: in this video, we're going to learn how to use the get keyword function in the program. This function is needed when our program needs a user input to proceed with some action or not, or some other options that your program offers the user to juice burn. So let's create a simple program to demonstrate how to use it. We're going to create a program called Erased Last, and we will prompt the user to select yes or no to proceed. So currently we have one circle. We have one party line in the drawing. That's great ally in. So the objective of our program is to erase last based on he's or her selection of the options. No, this great program erase lust. Currency in these last get cured always comes with the we need to get function where we can initialize the options to choose From. Now we can prompt the user with the the options. Let's see, we have the answer or ants us our variable to store the user's input, get keyword just to confirm. The user wants to delete the last object. Let's see, here we provide a yes or no options question work Now we're going to validate what the user and terseness see if ah ants is equal to yes, Then we're going to proceed to do it. The last subject. We can no issue a command Airy's. Then use the ant. Last function did enter and just from the user that the last object has been deleted. Then we close this Scott Bloch. Now we also have to handle if the answer is no. So we just from the Yusor se last object was spared and they were close. The if statement just issue Princey for clean up. And that's a so let's save this one, Elise last that l s B Now we can load it in Our I took a from limits were my funnies SP. Okay, so now if we issue the command and its last, which is, uh, no, I don't want to And it went to release the last objects. So we have here less Object was spared. No, it. Let's say issue another the command again and reaches. Yes, our last object quest deleted, and we displayed a message here that the subject was deleted sucking us what? We have a specified here. So that's just about for the get keyword function, Try it out with other options or choices in your program and see how it works. 48. 8: hi guys. In this lesson, we will discuss the interest object handling functions. There are six most commonly used functions as follows you're and sell and next and plus and get and mud and an update or anti PD. Let's start with ansell. Dysfunction prompts the user to select a single entity by either selecting the object or specifying the point of the object the symptoms sees. You can issue the command we just and sell and say the brackets. Or you can store the selected entity into a variable make so and next. This function returns the name off the next entity in the drawing so you can issue document and next in the entity name, or you can stored next entity into the invariable. Basically, it distorts the next entity in the drawing. There is no objecting the drawing. Then this one returns Neil, And plus this function returns the name of the last none deleted entity in the drawing, so you can get the last object by just typing this common. Or you can store the last entity in the drawing into variable. They last in this example and get this is a very important function, dysfunctional trips on antipathies definition data so you can issue the command like this and get in the entity name. And if you were returned ah, objects definition data. Or you can store the finishing data into a variable like this doing the prophet variable and mud dysfunction modifies the definition. Data of an object you see is uh, normally used in the substitute command or service T, where you can update the objects definition data. For example, if you are manipulating the line objects information, you can substitute the points using the Substance Command and then issue the end march function to update the objects definition data and that should be fathered by the end update function dysfunction updates the screen image of on objects of basically after you change any properties using the n mod, you need to issue the end updates so that the object will be generated into in this screen with a new information. So the same talks. It's just very straight forward and update and the empathy name that's about for all these object handling functions. We were explorer, each one of these in the next videos where we will try different entity types and explore their definition data. So I would see you there 49. 8b entsel: in this video, we're going to learn how to use the function and said this function prompts the user to select a single entity by either selecting the object or specifying point of the object. For example, let's say so. Thank you, Ellen, and sell Select a line, pick the line here so it gives us the entity name and the point where we select the object . So let's say as a circle, for example, and said connecting the circular, it could yeah, any point of the pyramid a circumference. Now this truck you got. So if I am only interested in the in the entity name another one. The point. So in our case for the line we have here the line object and the point where we select the object. But I am only interested in the entity name. So I can do this by applying the car function. It's a self. You Ellen, too. Car off and sell. This is surely a good line. So this one should only give me the the entity name off the line without the point. Yeah, If they said that, that's when the air this what we have, So check the value. We only have Dante to me. The same is true. If let's say we are only interested in the point sec You, Petey, you can apply to see a d. R function to the and so command Select a line So we get the point. So that's all about. And so Ah, rock this yourself selecting different objects, you know, supplying those ah list manipulation comment. And ah, I've served ourselves and yes, it very straightforward. Very simple trade out. 50. 8c entnext: hi guys. In this lesson, we're going to learn how to use the end next function. This function returns the name of the next entity in the drawing. So in this drawing we have four objects for entities. Is the first object of that created, fathered baby circle, then the Foley line in the Ark. So the same restore each of these variables into, I mean each of these objects into their own variables using the and next after the first selection. So let's say I started first. Object us into a one day is the 1st 1 so released a one. This is worse than that were object. So next I'm going to use them. Next function that's eight to and next of a one they released out that eight to He's a circle, right? No, we'll issue the end next function again. Secure a three and next Up A to we should give us the holy line. So if released out a three we have here the point of that now. Finally, if we issued and next one more time, let's say we have your four variable and next of a three, release it out a four. You should give us the Ark. If let's say one more time, we do another end. Next off a four, we should get a meal value because there's no more entity in the drawing. Yes, hear, hear the meal value. So that's just about the end. Next, in the next tutorial, we're going to discuss about the ant last function. I'll see you in the next media. 51. 8d entlast: in this video, we're going to learn the function. And last you might know this in AutoCAD e place. Say you want to at least the last object. You can just type in the alchemy. Last object. So list out the object. Or, if you want to erase the last object, just a nice like that in all Italy's, there's an equivalent command called N classed. So by typing the ant less common if you give us the object near order. Entity Name weakened due the same thing. Let's say, if you want to list, then aunt last. Well, it's not the last object that's been drawing drawing. So you can in these and plus, here you go. So that's just about the ant last function. It's just gives you the opportunity to store the last object in the drawing or issue any other comment on the placed objects. So, for example, we went to storied in a drawing that say last in plastic. So now we have the less there variable, the last object. Now we can do anything with that. Let's say we shoot us huge prop command. Then he last £1 say caller read, sharing go. So that's just about in. Plus, the later on we will apply. It is in our program. Okay, give me that. Try 52. 8e entget: in this video, we're going to learn the function and get this function retrieves on NTP's data definition . So the syntax for empty it is and get and the entity name. In this case, we can make use off the earlier functions like and sell. Let's say carp and so spec tonight. So this is the objects Property is the lines property. If they let's say we select the circle, for example, the issue another command. Now, at this time we select circle object. He's what you got the same. Issue another command and select a holy night. So this is what is that? We have the nine circle and the probably line and one more time Select dark these arts property. So you nothing's a difference here. Every single object has different property. So this is where the auto This programming gets more interesting because now we are, uh, doing a manipulation on the hood data model. You know, it is the line we have here that the object type which is to line the circles, Mr Paulina, and it's dark more. This common here is the code eight, which is the layer zero and ah, each one of them have their own handle. Five Mr Handel, and also the type of entity in this case, it's eight cbb circle responding nine use on so CCTV circle. But then it should be lying somehow. The art in circle are the same, but the object type is different. So we will revisit this one in more detail later on, once we start doing the after programming manipulating each of this properties. But for now, that's how the and get function works. So, for example, we would like to store it in the variable. That's a sick you and get off went last. See that? These so are last object, which is the art. This one here, remember? And next we can do the same thing that say one and get up. And next service that actually is the line right? Play with this one is very, very important. But we will discuss this in more detail was of the commonly use properties and we can start manipulating each one of them or maybe using in our program. Okay, so that's how the and get worse 53. 8f exercises: Now that we've learned how to use the utterly selection command, I would like you to do some exercises is the best way to reinforce what we've learned by applying it in creating a simple program and see how it works. You will also be more comfortable writing code, and that is the most exciting part. So there is one exercise for each topic. Let's go through each one of them. 1st 1 is using the insulin function Great, a program called Using and Sell to prompt the user to select a line entity and store that entity into a variable Ln and issue at least command to see the details. Exercise to using the end lest Function Creative Program called using and last to store the last entity into the variable. The last an issue. Also a list command to list its properties. Next exercise would, before the end next command creative program called using and next to select the next object and storing their variable R B J. Then issue a CH prep command and changed the color of the object to read. And the last exercise is using the end get function. Create a program called using and get from the user to select a lion entity and get the properties of that object and story in l prop variable. So I would like it to complete this one. And in the next video, we will compare our solutions. 54. 8g Solutions: in this video, we're going to compare your solutions to the exercises and my solution. So let's revisit the exercise objectives. The 1st 1 is using Insulin Function Creative program, called Using and Self to prompt the Yusor Select Line entity and store that entity into a variable Ln and issue a list command to see the details. So these are our function using insulin function. We have these variable to store the entity selected, which is the line entity. Then we issue a command list to display the properties or the details of that object that we selected. And we just provide here the princey for clean output of our program. So let's see if ah, this one works. Let me load my file. Sure. Sexual, eight extra sizes. Okay, so let's issue the first command richest using and sell and select the line. And here's O R line resource, which means his 1st 1 works. I hope you do the same thing Now Let's go to the next exercise using and less great a program called using it less to store the last entity into a variable. Alas, on the issue, at least command too, listens properties so It's basically the same thing, the 1st 1 except that we're using her the end of last, then tell us dreaded and the incident. So let's try that one. You sing and last. Here you go. So these our last object, the Ark object and its least a dread away after we Misha our command. So these working third exercises using the end next create a program called Using and Next to select the next object and storing their variable O b J than issue sch problem command and change the color of the object to read. So, using the end next year, we store the value into the LBJ variable the new issue, a CH prop command and changed the color to red. That's savings were you get working, using and mixed. There you go. So now our line turned to red color. Next the using and get the function greater program called using and again from the user to select a line and get the properties of that object and storing the have dropped variable. So using and selling we selected line. Then we get the property of the plan, using the end get function and storied in the L prop variable. So basically, this single line does, Ah for things first liquor line. Then get the entity name then and get that anti today, which means that we're getting on the properties and storing the l probable. So another way of getting the properties. You can start first with selecting a line the story in a lead common and then issue and get on that value. Then you can get the property. You can print the property in assess. You keep coding in other list. You'll be more comfortable using these ah caffeinated functionalities rather than breaking it, dying to a smaller individual line of code. It's it's ah, both are good in the sense that you can have your program very readable sequentially easier for some other developers to read your code. So wherever you are more comfortable, yes, keep doing it. So now let's try this one using intricate and see if it works you're seeing and get It's a good line, and here go we have the line properties here. I hope you got all day. Exercise is correct, and I'll see you in the next video 55. 9a SelectionSets: in this lesson, we're going to learn about the selection set functions. Italy's provides a few functions to select and store objects in other cards. We're going to discuss them 1st 1 by one to have a basic understanding of their usage and symptoms. But then we will explore further and see them in action. In the next lesson, they're a spy lives 1st 1 these SS get is the mostly used in the selection sets. Function dysfunctions, create a selection, said it's or a collection from the selected object. So the syntax for SS get is as this get, then the selection method 0.1 0.2, the least of points and filter list. All of these are optional, so you can either use only this part or only the spark our only this part or on the spark or on the this part. There are zero option on 1st 1 these let's say the selection, said Method. We're going to use the crossing, so we're basically selecting the objects using the crossing currents from 0.12 point two. We can also use any other selection method here, like W for window or C P for the crossing polygon or or fence more be for previous or L for last. So these are there are varieties off selection method that you can use here. So if let's say we're going to use the filter, at least for example, so we can make use of these command here said Q b Js ss get X. This means that we are selecting the entire database, where we are also selecting those in the layers that are off are frozen or even out of the the visible AutoCAD screen. So which means that X is your selecting every single outward object. And the return value is the selection set Corneille that say there is no object sentence that's been selected. So let's support the selection. I mean, toward the SS again function. Next is the s s ad. This function adds an object into a selection set or an existing selection said, or basically it creates a new selection set if you at a new object into a essa said variable. So the symptoms for SS ad is it's just add the NTP name and selection said So let's say you have on existing ah selection set called s s you can add new object or a new entity name and store it in the LBJ called variable, Which means the ah selection said S s all of the objects inside the selection said bless the new selection Said will be stored in the LBJ call selection said so. Same thing the return value is selection, set, name or meal. SS Dell is the opposite s ad. So basically, this one deletes entity from the selection set. So let's say the E name is one off the objects in the selection said S s. Once we issue the assist M e name s command, then it will remove the e name in the collection or in the selections. So they're turned values. The selection set name or Neil S s meme dysfunction basically checks whether an NTP's a member Oh, or inside of the selection set. So this is the syntax for assessment. If the entity name is a member of the selection said SS day to turn the selection set name . If it cannot fight it inside the selection set, then just returns meal. Next is the S s name. This function returns the entity's name of the indexed element of a selection, said the index starts with zero, which means that the first I am in the selection said starts with zero in deaths. So, uh, let's say we have here the existing selection said Then we specify the index. For example zero. It will give us the first entity from the selection set. So zero then turn the first entity So it returns the anti to name or Neil. Let's say we have only five objects in the selection of set. Then we put the index more than five. This you put six for even five since we start from zero, which means that it comes from 0 to 4 or the forest, the fifth object. So we put here, uh, five or six, then return meal. Next is the S s Lent. This function returns on inter your that the selections that contains. For example, if the selection set has 15 objects, then it will turn 15. This is very useful in doing a why Luke or looping through the selection said, and making the lent us a conditional value to evaluate if the last object has ever had already been a process. So these are all the mostly used. The selection set functions in the next lesson. We're going to explore each of these functions in not a god, so we can have a better or so live and they're standing up there actual usage. I'll see you in the next video. 56. 9b ssget: welcome back In the previous video, we learned about selection set functions In this lesson, we will explore SS, get in more detail. There are many variations off asses. Get function. You can use it as east without providing any filter or selection method. Or you can compose a more complex selection set by combining different filter criteria and selection methods. Let's get started. The 1st 1 is just by insuring the SS get command like this. Then we can select objects. So we have selected three and let's say we just leased the previous you have three. Another one is we can just issue the SS get X Come on like this. And basically this means that you are selecting every entity and AutoCAD drawing. So say this previous we have eight objects. Ah, next one we will store. Excuse me. Really? Store the SS Get function in in a variable as this as this get Then you can select object you have here Teoh. I have just selected. So let's say these. Yes, this we're fine. Another one is We can store the entire object in in the SS. Worry about all sauce. This is scared. Let's say We just wanted to get everything in the drawing. Yes, yes, we have at least the business we have all day thought gets. Now let's try selecting, using some of the selection methods that say crossing. So first off, we have to create a point crossing point. So let's get the first point. Let's see the 0.0.1. Get point. Let me start from here and set your point, too. Then get point That says on bleak somewhere here. So if we draw a line in those two points nine bt one Bt to So this is our line. Now if we use this to points in our selection, said so let's say set Q s s as this get crossing and between those two points and released the SSN this we have eight because we're we're using a crossing selection method, which means that all of these objects intersect in those two points from here to here. So let's say we select by window just rest. We used to swim here s window, which means securely only select whatever is you say that window and we missed the SS. We only have four. 1234 because our point somewhere here in here. Which means the text in the circle this well is the dimension are not You say that our window. Uh, you know, our Windows selection coordinates, so we only have four. Next, we can use the, uh, filter object. Let's try selecting only those lines. Secure s A lines is just get X. Then we cannot we specify. Remember the BXF drawing interchange format? The codes zero for the object type, right? 1234 So which means that you are only selecting all the lines in this drawing. So released those lines. We have three, one, two and three. Okay? So you can also select other different objects. Let's say let's say the light Great party lines in least those nines. You have only one this morning, but you can play around and select different types. Upper objects. Let's see. Circuit. Of course, you have the chance to variable here, make it more interesting. Tennessee circus list circles. You have only one here. Same is true with the text, Miss say restoring to the text viable zero is the type of texas text and then released the value of test text. We have one. Okay, Also for the dimension. Let's say sec. You danged variable for defamation as this get X zero and dimension Mr Value of beams. We have one, That's what Now we can also do a combination. Ah, of those objects, I mean the object properties. By the way, before I forget, we can also Ah, select the blocks and drawing and save. The LKS is scared X zero blocks are presented us insert So it released the bill Ks we have one. This is the one attributed Now, as I mentioned earlier, we can do a combination off the object properties in our selection set for example very going to select the lines with the dashed line Only those that it lines we are interested in selecting for examples you dice Is this get night? Close it then next field three air criterion would be What is the code for the land type 86 . Then we specify here the land type. It is a dashed land time. Right. So now we are excluding all of the solid lights here Realist. Now the dash. You only have one. Okay. Now we can also select based on the entity type in the layer. For example, we just select all those lines under the layer wall. So we have here delayer wall. So let's say I just wanted to select those layers in the delayer. Well, I mean, order stands in the layer Sick you Nyunt's and just get X. Let's start with zero us the entity type line. Now let's start with the next would be the layer. So it is well, so release now the lines we have three. These are all clear. Waas Lansing said that there won't no, we can expand the selections like we can add, Let's say s previously ah selected, let's say the dashed line. So now what do you get? You have one so you can make us many combinations that you want to narrow down your selection set. Yeah, you can explore what's what's being selected. So that's how is this get works? It's very, very powerful. I hope now you have a better understanding on its usage. We will apply all these different variations once we start developing our on custom functions. Next we will explore. It s a sad on DSI in the next video 57. 9c ssadd: in this lesson, we will see how s ad works as discussed earlier. SS Addis used to add an object in the existing selection set. It requires the objects entity name to be added. Let's explore a society in more detail. Let's initialize our selection set. That's A s s. So we released Our selection set is zero. It's basically an empty container. So now that start adding NTP's inside our selection said Let's say e one we would use the car and so select object to be added in to the selection of six. That's a very select circle. So now we have the one here and now we can add that into our selection. Said yes. Add the entity name which is the one and then the selection so released Now the value of our s s we have one which is a circle. Now we can add another one. Let's say eat too car and sieve select another state of text We have your the anti to name and we can add that run into the sec USS into very international ive to that's this if released know their selection said we have two objects. One Texan one circular we can even just keep adding the say, Seth U. S S s this ad instead of, uh, restoring the entity naming to a separate variable. We can just call directly the car pencil, then split it into our selection. Said so here we're basically getting the entity name and then they're adding it into the selection set. That's what we add this late. Released now our SS. We have three, and we can just I would be doing it. Let's say now we have We should have four. Yes, we can even add a an object from an existing selection said, Let's say we let's create one more selection settlements say ss two and let's get some objects. Let's say we have these weren in the dimensions. So our SS to I'm sorry, This that's just too. We have two objects. So that's I would like to add ah, dimension into our Morrigan in selection set, which we have here the SS right they have here SS, we have four. 1234 Now let's add a dimension. No, you can do this by yes, it's odd. Then we need to get the name off the selection. The object from the selection set, so s its name. Our selection set is SS two than the index. Yes. So you get the one that's the second objects in the selection set. Then add a quinto RSS So if you know, check our SS, you know, have five the original four plus the dimension. Okay, Mr Damnation. So that's just about Esa said function. You can add objects in the existing selection set in many different ways. Give me that. Try and see how it goes. In the next lesson, we will explore as a still function. I see you in the next beauty. 58. 9d ssdel: Hi there. Welcome back In this lesson, we will explore still function and see how it works in. Yes, They Ellis used to delete or remove on entity from the selection set. The syntax for Estelle is Asus Dell. The entity, name and selection said All right, so let's start to create our selection set. Select five objects. So we check our s s. We have I love. Yes. Now let's say I would like to remove the text from the selection. Said so let me grab that entity Name for the text. You've seen the car up and sell. It's in the next year. So we have here the entity name. So let's apply the still function sec USS as a still the entity name, which is the one from the selection. Said, If released out our selection set now we should have four values Texas no longer included. So we just have the circle two lines and one point. So let's say we remove another object that say one of this last year. The bottom Let's say said you eat too car and sell Mrs object. So let's apply another s Estelle Eat too from selection said Released out our selection, said. Now we have three, so just one line holy line in the circle. It's nice not over selected, so we can also do the same thing as this ad like it says directly, uh, applied. Ah ended to name the car and sell from the selection set here. Remove the selected object from the selection said That's a removed the polar line. So if released out now the selection set, you just have lying in the circular. So that's just about it. Using this still function. It's very straightforward when you have a selection set and you can you just removed any objects from it by using the antique name and that's it. It reduces the amount of objects from the selections that every time you issue a NASA still command. So in the next video, we're going to learn the S s member function. I'll see you in the next video 59. 9e ssmemb: Hi there. Welcome back. In this lesson, we will see SS meme function in action. S s move is very straight forward. It just returns the entity name if the object being very fight is a member of the selection said not that it just returns, Neil, Let's say, for example, we have a selection set with stress selecting the survive objects. Now let's ah, select one are Jack and verify its ah member in the selection set. So let's say you want that's just the car up. And so and say we select the steps and verify if that's a it's Is it the member of the selection senselessly e one A. Yes, this meme the entity name Richest e one and the selection said yes, it's a member because it returns the entity neighbor and I say we delete the object. Let's say e one a. That's a text gone now released out Our selection said we just have four. Okay, so let's say we select another object and very pipe that are Jackie's in this election said or not. Let's try selecting the dimension this time card and so that's a stagnation. You just not in our selection sets. So that's very fly. Let's say eat to a SS Men eat to selection set mill. So our to a let me Okay, so that's just about the SS member function. Very simple. To use one example usage of SS meme is when you are looping through the selection set and you are validating the objects for a certain criteria by checking the articular object is in the selection set or not. Then you can apply the necessary logic to your process. In the next lesson, we will see S s name in action and that see you in the next video. 60. 9f ssname: in this lesson, we will see. How is this name works? Yes, Its name is just used to get the entity name of the object in the selection set based on the index. Once we have the entity name, then we can now explore their properties of that object using and forget. So let's great our selection set. Let's say we select this for objects. No, let's get the first object. Let's say E one. Yes, its name. The selection set that we just created and the index zero. So this is the first object in our selection set. Here we go. We have the run. Then let's say we get the properties of the one. It be you won't be person. Then you can just get you one. Now we have the handle up. Uh, you one object that one of the properties of the text are here because manipulate these already. So let's say you select another object. Beef, too. Yes, its name selection set our SS. Then the index one. Remember that? The selection said index bees zero based, which means that the first object is zero and the second object, it's one and so on. So Now we can get the properties of E two c to be and get that, Peter. In this case, we have the poorly landless the second object so we can continue Teoh selection objects from within. The selection said that's his name selection set. Then the index to she's our number three. My town, then security three p and get a beauty. So now we have a circuit. So that's just about it for us. This name Very simple. You can use also these s s name when you are processing old objects in the selection set and get its entity name. And after Dad, you can get the properties and you can do whatever you want. So that's just about it for S s name. In the next lesson, we're going to explore the SS lent function. I'll see you in the next video 61. 9g sslength: Hi there. In this lesson, we will c s a slant function in action. Yes. A slim is used to determine the number of objects in the selection said in the example that we're going to do is we will count the number off block off cables in the drawing and Despatie the user. So let's get started. Currently, we have one one cable when luck. So this is this is the black cable that's straight to copy some of these. 12 three you're Let's say we have six cable. So that's great. That program and display the number of cables to the user. Let's say we create a a macro. Be fun. See? Let's see. Count cables Right? First, we're going to select all the cables in the drawing. So let's say great. A cable cables variable to store or the cables who used the SS get function. We used the entity type as, uh, one of the filter criteria. This concert another one is we used the the block name you conceive. Let's say there are some other blocks in this drawing. It might get selected also, so we have to be more specific, sort of like names cable. Okay, no. Let's get the length of the cables. The number of tables from the selection said, Let's say variable these l e n the land and the issue here the SS lent. Hey, Bones. Okay, Now we are going to display the number of cables in the drawing to the user. So let's use the alert command and we're also going to use the str cut. This is the string concatenation there are there are. Then we use now the the length of the cable to display here there is a function called tour . It's called into your toe asking basically converting the integer toe ask you so that we can use it in the string it will end. So basically we're getting the length of the cable and converting it to string. There are cables. There are a number of cables in this drawing. All right then just include Princey for being close it. So these is our macro count cables. If we now issued account cables command se, there are six cables in the drawing. You have 6123456 So that's where you use the SS Lynn Command. It is very, very important Not to this. You can use it to look. I looked through the collection, said the selection said, and then process. Every object in the selection said by using baskets land as the conditional expression. I must do rather you reached the last digit or the maximum number, so objecting the selections. So that's it. Give it a try and see if your numbers are correct by selecting some other objects and by by adding more, field third criteria and see if your numbers are correct in the next lesson, we will have some exercises for all these selections, said Functionalities, and that See you next video. 62. 9h Exercises: Hi. Congratulations for getting this far and for completing the selection sets tutorials. Now that we've learned all of the selection, said Functions, I would like you to complete the following exercises. This will be very helpful. To reinforce your knowledge on the subject will become very natural to you once you continue writing simple to medium size programs using this functions. Basically, you said to write one program for each function by following their requirements. So the first exercise we have east for SS get function. So using the Isis get function creative program called painted red by selecting all the lines for the line circles and text and storing them in their own selection sets, then using the CH prop command changed their colors too. Read then bring the message Painting in red completed when you're done. Second exercises for SS ad. So using this has had function Created a program called At object to add a line entity into an empty selection set s s Then when the message land object was added, Then get the count of the selection set and the state of the user exercise three using us a still function creative program called Dell object. Select all the lines in the drawing, then get the count and displayed to the user. Then proceed with the leading the first object in the selection set eso display. Then you can't again to the user after the division, sir, size four using SS men function great. A program called East Member allowing the user to select objects. Then store goes off. Justin selection Step s s now prompt the user to select an object and very by if the selected object it's a member of the selection set or not than print the messages according me basically print a Mississippi dog his remember if not then this spring the message saying that it is not a member in exercise five. Using us its name function create a program called get courageous and select all the circles and store in selection Step s s Then get the name and properties of the first circle in the selection set and display the radius Do the same thing for the second entity Also displaying the radius of the second entity in exercise six. Using us a slim great A program called get number first, select off the land objects and storing the viable lines, then displayed account using alert. Next, select all LW poorly lines under the layer road, so you need to have a road layer. If it's not yet created, you have a great one and the store those polar lines in the variable called P lines, then displayed account also using alert command and lastly, select all the text with style of italics. Any story in variable text and this baby counter the user as well, using other. So those are altogether six exercises. Try to complete each one of them, and in on the next video we will revisit the requirements and we're going to compare our solutions. I'll see you there. 63. 9i SolutionsToExercises: Hi there. I hope you completed all the exercises in the selection sets topic. In this video we will revisit each of the requirements and go through the code. You might have a different solution. It's mine. But for slowing us it address the requirements, then it's fine. Let's start with exercise one. So we have here the requirement using SS get function Great. A program called Painted Red By selecting all the lines only lines, circles and text and he storing them in their own selection sets. Then using ch prop common changed their colors to read. Then bring the message painting in red completed when done. Now let's ah, check our solution. So this is the first requirement. So we defined a function called painted red. Then we create a variable cold lines and select all the line objects in the drawing. Then, using the CH prep command, we changed the color of all the lines to read. The second requirement is great. A p lines variable and store old ah, all the lines in the drawing. Then you're seeing the CSCE prop command changed to collar to read. Same thing with the circles created a variable called circles and selected all the circle objects. Then, using the siege, Bracamonte changed this All the circles to call her read. The last part of the requirement is to create a variable text and store all the text in the drawing and also using this use proper command changed the color of text to read. Then we prompt the user with the painting and red completed who discredited your princess for a clean exit. So I hope you got it correct. And you have the same results as mine. Probably see or drawings Old turning to read. No, let's go to the next exercise using SS add Function Creative program called at object to underline entity into an empty selection set SS Then bring the message Land object was added. Then get the count of the selection set in this pay to the user. So let's check our solution. That's where they exercise to using this. This ad we define a new function called ad object. So in this code we great we initialize a variable s s has any selections that using is his dad. Then we prompted the user to select a line entity and the story that object into the and in variable. Then we added that new object selected object into the selection set using bases had function, then prompted the user land object was added and now we get the length of the selection set and storied in account variable. Then we just, uh, printed the message here. Michael, coordinating this words is brace with the conduct. The it's election said which is, you know, have one. Basically selection set has now one object. I hope you got that one correct as well. Now let's check the requirement. Number three. Using s a still function, create a program called l Object. Select all the lines in the drawing, then get the count and displayed to the user. Then proceed with the leading the first object in the selection set and displayed a new count again to the user after the delicious. So here is our solution for exercise three. We define a new function called Dell object. We created a selection set called s s and store all the line in the drawing. We didn't get the count of selection set and storing account variable. Then we display the message. There are for many count lines in the drawing using the str card and it wa which means that intelligent toe ask you conversion and basically concur automating this All right. And we prompted again deleting one object using Estelle. We get the first entity name from the selection set where this is Index zero. Then we delete that the that object from the selection said using their system function, we get the count again of the selection set which is now less than one. And whatever we displayed here, it should know be less than run. That said, we have here 10. This one should count nine. So there are now nine lines in the selection set. Okay, Next exercises Exercise number four reaches the SS member function great. A program called is Member By allowing the user to select objects, then store those objects in selections that SS now from the user to select an object and verify the selected object is a member of the selection set or not. Then bring the message accordingly. So these our solution for exercise for using is this member. We defined a function called this member and he created a selection set using the Isis get function. You cannot select multiple objects from this line. Then now we're going to select one object using the carp and so to just pick an object that we can use to validate from our selection said. Now we have here the if condition we use, basically validating if the objects we selected is not kneel, which means we selected a valued object and it is a member of the selection, said SS. Then we prompt the user with selected object is in the selection set. If, however, the object we selected in here, it's not part off the selection set, which is the first of us that we selected, then this one will be executed from the no object. It's not in the selection sit, and that's it for a slur. Size four. No, let's check exercise number five, using as his name function Great, a program called Get Radius and select all the Circles and this story in selection said SS didn't get the name of an properties of the first circle in the selection set and display their radius do the same thing for the second entity. So here is our exercise five. Using is his name we define a new function called Get Radius. We created a selection set and select all the circles in the drawing. If you ah have no circle created in the during, have to create some so that we can have something to work on. And then great, this variable and store the first circle from the selection set using the Indian zero. We didn't get the property of the first entity and store it in the variable. You want P now using the association least remember that the port, the 40 40 is the radius. So in here you get the 40 point whatever Is that the radius of the circle? Then you get the CDR, which is just the radius. We don't need to 40 so restored in the variable cold rod one then we just printed the radius of the first circle is this one are close is basically the realty string conversion using the decimal, the function here and ah, we do the same thing for the next entity in the selection said with an index one storied in eat too variable. Then get the properties here and same with the 1st 1 to get their Ageas of the second circle and storied in the red to variable and this played radius of second circle is this for? So I hope you get that one correct as well. Next, let's go to the last. The exercise number six Using S a slimmed function creative program called Get Number. First, select all the line objects and storing their variable lines, then displayed account using alert. Next all select all LW poli lines under the layer road. Great road layer if not yet created and story in Pioline's variable and displayed account. And lastly, select all the text with style of metallic and storing variable text and displayed account to the user. So here is our solution. We define a new function called get number. Then we select all the line objects and store that in the lines variable. Then, using the alert function, we displayed a message with the kind of lines using a combination of Yes, they are cut and ah, toe a function that integer to ask you function and next we selected all the pollen objects under the layer robe is the extra filter here and store them in the felines variable, then, using the other command displayed a number of plants in the drawing. Less part of the requirement is to select all text with ah style, a bite Alec then displayed to the user missing alert. And there are a number of circles. I mean, a number off Attallah tests in the drawings. So that's all about for the solutions. I hope you had fun creating the program yourselves. And at this point, I'm assuming you are getting more comfortable now, writing out of this program in the next ah lesson, we will learn about conditional is and loops. I'll see you in the next video. 64. 10: hello and welcome to the conditioners and equality functions in other leas. In this section of the course, we will discuss about conditioners and equality functions. These functions are very importantly, not all this programming as they provide logical functionalities to evaluate expressions that would give the developer direction to continue with the process. Depending on the results of the conditions in this particular video, we will learn about the if and programmed functions. Let's start with the if statement. This is the function that evaluates expression. So in our example here, we have a viable extra value to and this is our expression. So the syntax is if than expression that the results. Basically, if this is true, then it executes this line. This is the then part of the results. If X is greater than three, expression is false. Then it will go to the else statement. In this case, it could print this, uh, message here. So the results of these expression the conditional expression it's actually false. So it will then showed a user this message rather than the that then part because this is false. So if X is greater than three, we just not true, it goes into the else statement, however. For example, let's say our value of excess four. So if X is greater than three, then this will be executed and the user can see the message. Excess created that three. So that's just about the if statement. It's just basically evaluates the expression and process the then park or process the and spark no. Another, uh, part of the if statement, which is when you are, uh, processing or have more than one results in the expression. So in this case, that's where the program and comes in into play. Basically, dysfunctions evaluation. Each expression sequentially and returns the value of the less expression. And these normally use in the if conditional function, so assuring we have the same example. But we would like to do more than just one process here. Like other than providing message to the user, we still have to do some other functionalities, for example, so we need to use the program. It's basically grouping the code into one single called Love. In this case, you ah X is created, and three it will do this. Otherwise it will do these. So in this case, since X is to waste less than three, it will execute this code black. It will bring the message to the user and also do another message. You can do some other functionalities here spending on the results of your condition. So, yeah, that's just about the if in the program, very simple to use, basically following the syntax and depending on the resulting ah effect or message you would like to provide the user, you can either provide a program or just, uh, provide one single statement for the user to see the results. That's about program. And if statement in the next video, we will continue with the other conditional functions, I'll see you there. 65. 10: hi. In this lesson, we will continue learning about conditional functions. Let's discuss while and CQ functions well. Function is a function that evaluates a test expression, and if it's not, meal evaluates other expressions and repeats the process until the test expression evaluates to kneel. So in our example here we initialized the viable CPR or counter. We'd one value number one and then we execute the while a function here. So it's just evaluates this expression continuously while it is true. So in this case, I mean evaluates city art. Is it less than or equal to five? Yes, because initially we have run value. So then it will just print out the counter value and then we incrementally it one. Then it flips through again. Now our CTR has the value, too, because of this incremental here below. So is to less than or equal to five. Yes, it is. So then just prints the value again and, ah, it increments again the third time. So now our CPR has a value of three, then lobster again and checks it. It's still less than or equal to fight, and it goes on and on until the counter value becomes greater than five, then it will exit the loop. So that's just about for the while function. Based on the definition here, it's just continually executes or evaluates the expression, and it exits the loop. Once condition, it's no longer valid, so it brings from 1 to 5. Then when the value turned to six and then it's just expect goes out off the wild breaks the all right. The other function is the EQ you function. This function determines whether to expressions are identical. The same taxes just evaluates the expression one and expression to. So, for example, we have here variable and one we store a list of numbers one poetry into anyone. We also have another variable called in to then we also initializing 24 and five and six. Then we set you and three with the same values and to and when we test the values now e que and one in three. So basically this en one equals two entry. The result is false. They give us meal value. How about the other example here is and three equal to end too. Yes, there is all this true. So it gives us the tourists us. Basically, you can use this one in the conditional statement in the if statement. Let's say then else and then you can continue with your processing. So remember these. It's just evaluates. If the two expressions are identical, so that's about while and CQ functions. In the next lesson, we will discuss more conditional functions. I'll see you there. 66. 10: Hello there. In this lesson, we will discuss the con and and conditional functions. Let's start with you gone. This serves as the primary conditional function for arteries. This provides multiple expressions in one cold blood where you can validate expression in different values. Syntax is start with the Khan statement, and in between you can have multiple expressions, so that's a we have a variable ants for answer. If let's say they use sir and and third Capital. Why, then we store the ants variable with one with the value of one. So we also capture if the user enters small letter. Why we still capture this one? If the user entered a capital end for no, then, well, yes, store zero. That's variable. Same thing. If the user just entered a small letter end, you also restoring the value zero in anything than why RN provide the value. Meal is the depo, So if either of these four are entered, then ants will have a near the value. That's just about the con statement. Now let's look at the end expression or end function. This function returns the logical end of at least of expressions, so these the syntax. We have the end and we have several expressions here You have a right. We have here an example of three conditions. So basically we are evaluating if X equals to and it's why equals five and is the variable s s simple for the selection set? Is it not equal to kneel? Then? If all of these conditions are true, then it returns. True, you found conditions air true. However, if any of these three conditions it's false that it will give us false or all of these expressions here are false that you could give us false. So that's about the logical end. Make sure that each of these expressions are true to satisfy your condition. Otherwise, if one of this is false, then process the the else part of your code black. So that's about the conned and and functions. In the next lesson, we will try and see all of these conditional functions in national. I'll see you in the next video 67. 11: Hi. Welcome back in this lesson, we will dive into the outcome data model In this part one. We will look into the properties of flying, hold the line circle and text objects. In the next video, we'll look into the properties of dimension, black and attribute of Jess. We really explore each of the objects commonly use properties. We're going to understand the group codes and their usage. Once you understood the group codes, we can now manipulate in work on those properties easily and basically do whatever we want with those values is where we can see and experience the power of Italy's. We now have the control of apricot objects. Imagine you are able to manipulate objects without even touching them. It is up to us now to come up with ideas. What to do with them. We'll go very quickly and examine whether they exposed data for each of the objects. Then you will explore it further in AutoCAD. Let's start with the line object. So you get the property of line we have here the entity name. Bring a group code of minus one. We have the object type which is lying with the group called of zero. We have the layer which has the group called of eight. We are in the layer zero and it is time a cbb lying and 10 is the starting point and 11 is the end point. So those are the properties that are very common in the line. Object. So next. Ah, let's examine the properties of holy line. So we have the same entity, name or a negative one. And these our object type, which is LW poorly line. And we are also in the layer zero did the 10 for the Poland or the Vertex is use the first point second point in the third point. And let's examine this circle. So we also have the same entity name here. We didn negative run code, the Object IV's circle, and this is the CenterPoint and this is their radius. That's for the text. We have the type text, and we have delayer zero. The 10 is the instruction find of the text, and one is the text value Texas string. And certainly it's the standard style, the text style, and out of these objects, we have a common code for number five uses to handle that is Ah, not commonly used, but each of the anti Fiester own handle. So that's about the first part of these are quite objects. In the next lesson, we will explore the dimension Black and attributes I'll see you in the next video. 68. 11: Hi there. In this lesson, we will explore that I mentioned Block and attribute. Object has read the previous video. These objects have the same common properties but with other additional values. For the dimension we have here the damage the entity type which estimation we have here the layer and we have here the they mentioned text This one by the fourth is just a blank string. But in the yusor enters value. Let's say he modifies the value without accepting the people that it would be showing in here. The ah three, This is the dimension style the 13 This is the and point off that I mentioned line at the left side of the measured object for thing. This is the end point off the dimension line at the right side of the object. 10. This is the endpoint off the Dimension Arrow, but the right side and 11 is the insertion point of the dimension text. Now let's go to the block block has Ah five bean Sir, you. This under the layer zero two is the black name and 10 is the insertion point of the block that's examined the attribute Attribute blocks are also defined us in certain, but distribute has some extra information, but they're all ah contained in a single attribute. Black definition. It has zero layer is the block main and this the insertion point of the blood. In this example, I have defined two attributes for the cable block, so each of these attributes have also their own properties exposed. Let's say for these first attribute reaches the cable type. He's cold, that tribute tag with this under layer zero with the textile of standard and this is just the attribute value for the other attributes. I have defined the tag as cable length and this is the value. Same with the 1st 1 is having a standard textile, and it's in the more than space with the layer in zero. So we will explore all these in the next lesson in In autocad. However, I would like to point out that, but there are so much more information about the D X, the group coz if you want to explore further on that, just google the out of the group codes and you should get this you are in here. This one missed all of the values for each of the the group codes. So if you have some requirements to explore some of these properties, some of that banks run or more complex properties like the treaty information for the extender data. You can go through this list and find out which information you need, and you can also process them accordingly. Samos, The commonly ist group codes. So that's it for this lesson. In the next lesson, he will explore all of this information in Not well, I'll see you in the next video. 69. 11: Hi guys know that we have idea about AutoCAD objects definition data. Let's further explore them by writing a program that directly interacts with the objects data. Let's start with the land Objected. We have here line under layer zero. The coordinates starting point and point. The coded we're going to ride is to move the starting point from the scored in a 200 So let's write our code. Let's call these moved to zero function before we continue our coding. Let's Ah, let's investigate first. What is these lines? Properties or lunch definition data? We do that by using the get car off insulin. And these are our properties. We have here the entity name we have here. Object type, richest line. You have the handle we have here the layer currently under layer zero and we have the starting point, the 10 and en Pointe 11. So our objective is to replace the discord in it The X Y, and set with 000 Okay, that's right. Our code. It's great. Variable l for the line. Select a line. Next, let's get the line property for the line definition data and get the end next now that we have, these can't get or the line properties, which is this one here. We can use the substitute command. So that's great. A new variable that will hold the value of the new definition data we used to substitute common. The syntax for substitute is the new value in the old value. And then the least. So we're going to construct our ah list association list of 10. So us cons 10 then list 00 That's X. Why? And said Okay, and we're going to replace the association. This a pen? The sensation s a 10 off healthy. Inside the health. Be variable. Okay, Now what we need to do is issue the end mod common to update the objects new definition data and followed by the end update, which is the line object. Okay, so let's give this one a try. We call this one moved to zero that l s B. That's snowed. Our code that we had the function moved to zero. Executed. Nice. So that's about it. How is it is to manipulate the auto gods information data or they're finishing data. Well, you have to do is select which particular Ah, component are or property you would like to update. So I would like to challenge you to changed the layer of this line by using the substitute command instead of the common ch proper. So give me that. Try and see how it goes in the next lesson, we're going to explore further on the Poland object. This one here and see you in the next video. 70. 11: Hi guys. In this lesson, we're going to explore the circles data definition. So let's get started. That's examined first. What is the circles? Data definition and get carb and sell? It's movies o our circles data definition into the type of circle we ever did. Entity Name. Layer Under layer. Column 10 is the center point and forties, the the Radius. So let's create a program to changed their radius to some other values. Let's school our function change radius and that's great. The variable called C car and said Select the circle. Then we get the property of the circle. Put it in the CPI variable. Now, since we have this data definition here, all we have to do is replace the for D the association, the supported to some other values. So that's great and new variable. And we used to substitute command again. Sub substitute functions. Con support. The ah, let's say we enlarged the circuit. Currently it's one PPT. Let's make it 300 and that is the association least 40 of the city. Then great. Just execute the mud, then updated. Okay, that's it. Should be Goodness saved this Run, Teoh. Oh, are this chains. We use that Ellis p loaded. It's execute our new function changed radius. So the expectation is the size of the circle will be doubled. Nice. So that's just about it For the circle, you can changed the insertion point, the layer or anything you can think of from these. Ah, mater definition. Okay. In the next video, we're going to explore the text object. I'd see you there. 71. 11: Hello and welcome back in this tutorial, we're going to explore the text definition data and how we can manipulate those information . We're going to create a program to replace the text, the Texas string. We also replace the layer as well as the style. So let's create our program. But before we do that, let me just check this style in this drawing so we only have one. And if we get the the definition data is text we have here, the style is standard. Layer is zero and the text information is one the quick brown ups. So these are the three attributes that we're going to change. That's a great first. It's a new style. New create italics bold with a bold italic font style. Make this too fly. Okay, so now we have this style. If we check the layer we have here, the annotation is the new layer that we're going to update the text of fun. All right, so let's write our code. The fun. See? Let's call. This one has changed text. Okay. Mets great. A variable to select the text. Is this about the same as the previous exercises? More previous videos So we get the car and sell said like a text. By now, you should already be familiar with the steps that you cxb get. The properties of the texts are the definition data and now that's what they comment. Here they the text string layer and style. OK, so that's great. A new variable to replace the existing data definition by substituting those three ah group codes the eight seven in the one. So let me create the XB. New substitute groans off. Start with the Texas string use one one and then the text, the value that you would like to replace it with. They say he lower world and then rich association This you would like to replace or it should be a soft one of the p x p from the T XP list. OK, next we'll update the layer. Let's dio ESPN two Now we should substitute this new layer in these variable because this one now contains the dated information with with this new Texas string. So we will substitute the cons eight for the layer and we are going to use the annotation there and then we will replace the association eight off the t X p n Okay, in the ESPN variable next are going to replace the style. So set duty XP, end this name this three ESPN three substitute cons. Ah, seven. So, instead of standard, we're going to use the new layer. I mean, the new style that we've just created. It's ah, metallic boat and association seven. This should be t XP end to because this T XP into variable has snowed updated information with all these changes that we've done. So we should your face into that variable and then the XP end to this. Right. Then after that, we need to issue the end more function. T x p n three That, of course, followed by the end update up the the text object. Yes. Maybe we can just trump the yusor when it's done. All right, so let's save this file. Save it has changed text that l s b okay. And now let's slowed. It changed text that their the speedy So now we have the function change sticks here, Let's run it. Select text. Nice. So if we get the properties of that new object, I mean the modified object we should see the layer is no annotation. Texas Now there were and the stylist? No italics boat. Right? So having these knowledge to replace the text information is very powerful. Imagine if you have a complicated droving or a big drawing with so many text in it and you decide to change the height of the text. Or if there are some text that doesn't comply with the layer or style requirements, you can just great of program and automate the changes. All right, I'll see you in the next video. 72. 11: Hi, guys. In this tutorial, we're going to explore the dimension data definition. So I have here created a number of dimensions. They're just the mirrored objects. If released out one of the dimension information here it is under layer zero. And the Dimension style is I s 25. Let's check our layers. We would like to put those dimensions into layer that mention okay. And if we also checked the dimension styles, I have created these custom style with these properties of the dimension texts and the colors. Okay, So currently all the dimensions are in this eyes on 25 style. So let's ah, uh, let's examine the definition data, the dimension. So these air old information we have for the dimension. But we are only interested in updating the dimension style a swell as the layer, which is currently under zero change this one too dimension layer in the style to custom. Okay, let's start writing our code. Now. That's name. Our program changed them. It's the same routine ist previews videos. It's great. A defamation variable for our selected dimension using the carp and sell. Let's get the property of that and store it in a DP variable. I hope that this states you are not comfortable writing these small programs. So this for the comment update, uh, did I mention style and layer? So now we can Since we have the the finish in data and is variable, you can start substituting. There was values Teoh, the the mission property new substitute. The Cons three reaches the style with our new style, which in this case, I have created a custom dimension. Stein. And it should replace the sl three up DPD that the P list. We're going to replace the layer also so that they could be in the proper layer. DP end to substitute corns eight Dimension Association, least of eight from DP in, which is our updated variable. Now we can just do and mud and followed by an update the dealer. Okay, prompt the user. Done. All right, So let's save these program and try that. Just this has changed. Deem that l s b okay. No changed. Aimed at l s P chains dim. Shouldn't be changed. Dime. Okay, changed them. So let's select this dimension. There you go. Is the latest dimension. Still now, however, if let's say you have a complex drawing with lots off dimensions. It's a chef drawing. But you noticed that some of the dimensions didn't really comply to the driving standards that your company, ah, allows or requires. It's ah, great. Another program, too. Go through all those dimensions shredded and picking one dimension at the time. Let's create another program code, uh, one C instead of change. Deem will make it changed teams. Okay, so now, instead up using the carb and sell, we're going to use the selection set. I hope you are still familiar with Selection said. That's the lesser we had from the previous section. Let me gather all the dimensions in this drawing that say seem dim, secure deems. Yes, it's get X gather all the dimensions. Okay, we can adhere. You can adhere Extra filter that say layer is zero. So we're only picking up. Does they're mentioned are still sitting on their layer zero. Let's initialize a counter variable zero. And also let's get the length of all these dimensions. The trip selected Missy lent up the dimension that would be the SS lent off the dimensions . Okay, Now, in order for us to look through all these dimensions. You really to have a while loop. So let's start with the while and our condition would be If the counter is less than the dimension length, then we do the work. So since two we are looping through each of the Dimension object, We will be needing the yes, its name to loop through the selection set. So we need to use the s s name from reached selections set from Deems and the counter, which is the index. Remember, this is zero based index. So which means the one the first entity in the selection said can be retreat using the counter off value zero. That's the first entity since it zero based. And then, since we have this, we can just copy this code here. All right, the student proper alignments. It's easier for us to read. So notice the difference here. We just actually erupted with the while loop and getting all the dimensions and everything are the same in this roadblock to this code block here. All right. However, we need to add one more line of God, which is to increments the counter. Otherwise it won't looked through the entire dimensions from this election said So every loop that we do increments the counter, the 1st 1 is zero gets the first element than the second run Discounter becomes one. So it goes to the next object Next dimension object. Okay. And discovered this one done after the Well, Okay, so let's give this a try. Save it. You know the updated code. Now we have to change deems function. Let's run it. Nice. Notice this all of this dimension. So with this knowledge to look through the entire selection set, it's very, very valuable. You never know when to use these. If you have lots of dimensions that strays in many different layers or with different their mission style stand, just threat this type of good, and you should be able to update them on. Okay, I'll see you in the next video. 73. 11: Hi guys. In this tutorial, we're going to deep dive into the black and attributes data model. We're going to explore how we can substitute the values or update the value of the attributes in destroying here. I have created a simple subdivision area where these are the lots, the white ones and these are the that distribution cables. And these do line. These are the transmission cables. The objective off the program that we're going to develop is to replace the voltage of these distribution cables. Let's say, from to to kill boats to five kilovolts were assembled er a lot off lots in the subdivision area, and we have mistakenly entered their own bolt age number. Now we're tasked to develop to change those values automatically, rather done manually editing one block at a time. So first off, let's list these people here. This is layer cable. Been saying with this one, these are certainly cable. And let's list on the block is where we are more concerned about, so it's under table in full there. The block name is cable and we have here two attributes. First attribute is bolt age in the 2nd 1 s cable type. You know, this the hierarchy or the structure of the block. That tribute block, this is the main look. This is the main object. And these are the sub anti peace. So that is the main entity of love. And these are the sub entities. One attribute, another attribute and ah, and sequence. Okay, so we have here the tag, which is the voltage. And another tag here is cable time, and the values are five. Baby in that cable type is distribution. Okay, so if we let's say we added the block attributes is the These are data gets See the world stage in the cable type. All right, so the objective of the programmers mentioned earlier is to update the value. Ah, the voltage from to killer both to five kilovolts. Because so here. So you know this. These are two kilovolts and these are five kilovolts. They're the same as the one from below to to to rent five kilovolts. Here we will make all of these five kilovolts. We can do that by manually changing this one value that that could be teen years, depending on how many blocks do we have? The savings are hundreds of houses in this subdivision, so you can do it manually. There's a lot, so that's great. The program. I have your grated a skeleton. So let's call it update cable, the fund, see update cable. So but they were going to do is to select all the cables in the drawing set. Q. That's great. The cables variable that will hold all the cables is this Get zero? It's block. So it's an insert to. And look, name is cable. Okay, This also initialize our counter and let's find ah, Len off our selection said using Bases s Lent and the cables. All right, so now that we have these, we can start our while loop while the counter is not equal to the length of the cables and we will continue the processing. So we're going to look through the selection sets now, so we start with the first object. Let's call that cable as its name cables and our indexes to counter, which is to make sure license zero. Next, let's get the cable properties or the cable definition data by using the end yet in the cable. Okay, Before I continue with this one, let me just show you first. Here. How can we look or how can we get the They're finishing data often. Attributes. Let me just create a variable called a and get car up. And so it's a Nissan. Okay, so, business what we have here they insert which is the which is under layer cable info. And the block may miss cable. This will in the hey, but that is the blood. That is what corrupts the attributes. Now, how can we go to the attribute level? How can we go to the sub entities? We do that by using the can't get of next up CDR s O minus one. See this one here? Which means we are getting into the sub entities the next off this entity and next of a Okay, So you have noticed that oh, are object type is now attributes. First, it's insert. Now it's attributes, okay. And we can see that we can see that the value, which is five kilovolts. And this is the tag which is the vault ation. All right, now, if we big beeper, let's say we would like to get too The sequence The end of the sequence So let's say sick, you see, and get CBR can't get up and next see the RSO minus one off b. See this one here for B. We get the cedar a soft minus one off A, which is the main entity. That's what we did. So in this case, we're going to get the next attribute from B. Okay? No, what we have here, we get another attributes and we get the tag, which is the cable time, Where the value of distribution. Okay, so this is the main rapper the block. This is the first attribute with a tag off voltage. And this is the next attribute with a bag of cable type. So we do Another said Q s a d another and next and get. And next of CDR, I saw minus one Upsy senior when we stood other parenthesis here, you notice that this is now the end sequence. Okay, so black attribute one attribute to and sequence the consequence. So if we do another, let's say another and next goes to the another to the next block again. Okay, so we should end here since you get the sequence and already All right, so going back to our code. We're going to look through all the cables the blood cable blocks in this election said so now we get the first cable. You get all the definition data next, we need to get the the type so we can see if it's an attribute or sequence and or insert. So in this case, let's make it a block time. CVR I saw zero cable. This is cable P or cable properties. Okay, so you see there a self zero. This is the one that you were trying to get here seedier asac of zero, which is the we're interested in this one. Okay, that is the blood type. No, we're going to do another. Why, Luke? Because now remember, we have two attributes, so we have to look through those attributes until we reach the end sequence. So while attribute while ah not equal the block type two secrets and we will get the the new Ah, the new block. I mean, the new attribute. The next entity said you came on p and get and next cdr a soft one of cable be basically we're using the same variable because we're just looking into the the blood attributes. Okay. And then we are going to do the same thing and let's get this month. See, there s a cable p we're getting a bitch. A tree or or sequence. And so now that's do an if statement if the block type it was tribute or a tree, we do the program, which means now we are getting the tag name. Is it the cable type or is it the voltage said you tag name CVR saw, too of the cable properties. Okay, now we check again if the tag name equals to bolt age. Because this is what we are interested in. These were very interested in right. The tag name is voltage and we can get the value because this is what is the one that we need to substitute. So the tag name is equal to bolt age. You do another program, we check if let's say the for that. We need to get the value of the voltage here. If the tag name is equal to bolt age, you do a program than me. We get the voltage value sacred the variable voltage to hold the value. CVR a soft one off cable P. Okay, that is the value. A soft one. This one CVR of a sock one is five. That's what we are Interes city. So if the bolt age is equal to to PB broke and that's for to eat, we're now going to substitute, which means that we found what we were looking for. We now have to substitute the value so our new value should be five. Baby. The two caveats that enough. So we need to increase it to five k b eso one of the cable be in the cable police cable properties. Okay, and now a shoo shoo. Uh, now that we have already substituted the value we need to issue the end mod command boat new more than you will taste variable and then followed by an update of the cable. Miss Ma. All right, so this a little bit long program What should be able to follow it fairly easily? Princey. So we have to increments the counter just before the end of this. Why? After the inner while so that it goes to the next entity. Okay, set Your ctr went thus City are. And then once it's done just that from the user dating. Ah, cable value is complete, so I can make that. All right, so let's examine the code very quickly. First we get all the cables, we initialize the counter, you get the length of the cables. Now we're looping through each of the entity inside the selection set, and we increment the counter after each. No. Then now we get the first cable object. Then you get the the data definition. Then we check the block type using the sub zero. Then we're going to look through the attributes. If it's not yet secrets, secrets end, get the property of the next attribute and rechecked again. If with the block type is a tribute, then okay, we get the tag name in the tag. Name is voltage. The process. We get the voltage value. Now we validate the value. If the value is two K B, then we substitute with the five k view value and we do the entity modification an update. So that's about it. Let's save this work this program and update game on. And when running. So the expectation is all of these two killer by blue boats. We'll have a five kilovolts after the program is finished. OK, so update cable. Nothing's happened. Why is that so it looks like we have some problem with our code. Let's investigate. Yes, correct. It's try this one first just to make sure. If we're we are selecting. Correct? That's right. So correct. We have 18. Just correct. You get to see their SL zero lock types, not sequence and cable be and get. Save yourself. Gave B. It's correct. Luck times See? There s okay. Will be last time A tree. Correct tug name. My name is booked age. Oh, these rooms if shouldn't be closing here. This is the closing of the statement. Otherwise is this block would not be executed? The if should be closed down here. All right, Save us these. Okay, let's say it again. Noted No. Si after these update Que Brunner? Let's try it again. Too many arguments. 123 program and one, 212 Substitute corns one a soft cable. Be So you there a saw. Okay, upon the problem is the problem here. We missed one parenthesis there. Okay, Save it again. Note it and run it. Too many arguments Still there's a problem. So this is the problem. You're also missed. Wanna parenthesis there? Okay, I think this should be good Mr Again, that this part of debugging So that would be very normal when you are starting developing your own coat. So let's run again. Hopefully, this one can execute without any problem. All right, updating cable value is complete. Really? Doesn't seem to work. Okay, fund a problem. The counter should be. Should be outside of the inner wild. Okay, so it should be here outside of this world. All right, let's save again. Reloaded and try again. There you go. See? No, all of these values are all five, baby. No more. Two K B. They're all now five, baby. Okay, so let's say yes. For the sake of testing this code again, now that we're all five K V. Let let's say we changed it back to two k b. All right, save it. No. And to run again. Date cable. So all of this should be become too. There you go. See, They're all now two kilobytes. I mean, two kilo volts. So that's how you do it. All right. Tried to play with this code. Trick it out and let's say, except a user input instead off during the hard coating of values here, I used to get string function to you, get a user input. So whatever the user enters it should replace that new values here. Okay, so that's a wrap up these section. Hopefully you had now a good understanding of how to manipulate the objects. Definition data. I'll see you in the next video. 74. 12: Hi. In this lesson, we will discuss about the symbol, table and dictionary handling functions in Natalee's. Whether the symbol tables symbol tables are used to store none. Graphical information in a drawings database. The symbol tables that exist in the drawing database are the up I D or the registered applications. These are mainly used for extended data blocks. Deem styles there mentioned styles, layers line types, Texas Times named use, recording its systems, named use and named view ports. All of these are not case sensitive, so you can use them in your code, even in the lower case. So there are three major functions in the symbol table two access to information or search or retrieved the data. 1st 1 is the tibial search. This function searches a symbol table for a single name. Syntax for that isjust people search table name any one of these and actual symbol name. So, for example, we're searching for the style with the name of standard release. Existing should give us the list off. This results with the the type, which is the style standard, the name of the style and some other information, like the text height and the Texas stream. The next function is tibial. Next, this function finds the next item in a symbol table. The syntax for that is tbl. Next in the table name, and there's thesis optional parameter or argument called free wine. I have been no tear that these induction argument If these s precedent and it's not Neil. A symbol table is 31 and the first entry in it ISS retreat. So in our example here, we specified a rewind argument is true. Basically, we are looking for the next layer in the database this dictionary database, so it gives us the results the earlier the 95 But these are all the breakdown off the the layer information. The next layer in the dictionary is a symbol type, which a layer is the symbol Name. Layer zero. It's the flag, the color number, which is white and the line type. Please continues. The next function is T B l O B. J. Name. This function returns the entity name of a specified symbol. Table entry syntax for that is TV L O B. J name. Then the table name in the symbol is about the same synthesis with BB a search. And so we searched for the block and then the block name here in the light block me if it is found that it just returns the and detaining. So the difference between the tibial search and ah TV LBJ name is that the O. B. J name just returns the entity name while the tibial search returns the least. Well, it's about the functions for the symbol tables and dictionary handling. We will further explore these ah functions in the next video. I would see you there. 75. 12: Hi guys. We've already learned tibial search function from the previous video. In this lesson, we will create a program to see how it works. So the objective of the program is to replace the text style that's examine first. Ah, what are the styles in this drawing? So we can see that by typing this style and you can see that we have here 123455 styles. So let's create a simple program to substitute the style of the text. Let's call this one as a have fun this winter. Not be smooth. The front See update style. Okay, so assuring that we're going to use the architect style. It's just hard coded for now. New style se architect. Then we will ask the user to select a text we're going to replace read architects style, so we will use the car and sell, then prompt the user to select a text after a place where the style Okay, one more. Now let's get the property of these texts. Thank you. Let's make TSP or properties and we will do the and get the text now illustrate another variable. The really hold the value when we substitute the style of the text from the safety XP new. You will use the substitute command and which particular least we're going to substitute. It would be the style of the text, which is in this case, we'll do that. Seven new style. Mr Be Dead. The new style. Then we will replace the old style, which is in the list. Is the association list up seven of the T XP and you will do it in the TX. Be very about. Okay, then we're going to issue the entity modification and mud to update the list. The XP. You okay? Then you really should the end, you pd so that that dated entity will be regenerated. You now are growing. And then just difference. See? So let me just break it done further the first line. We are just actually hard coding the near style, which is this one here. The recent way I chose this one is because if I list down is fixed here, this stylish standard Okay, so we will replace this one with the architect style. That's where we had co ordinated us in the in the new style variable hargitay and then we select the text. So if you remember the end cell, I just hear you the answer. Select object. It gives us the entity name and the point. Right. So we are only interested on the entity name. That's why we use the cars. Next, we're going to do the and get to the entity name, which is, in this case, to get on the drawing definition data. Okay, so this is what we have. 40 x b. You can see it now. We create at least ah style reaches con seven off the architect, and we're going to replace the ASAC seven of T XP. There's just the one. So basically, we're replacing these texts. We're placing the text with this one here. The architect. Okay, so this is the the finishing date of the text. We will just be replacing this one with the architect, And then we updated, and we we what we should and money to update the data definition. Then we updated. All right, so that's straight this program. Let me just say that first, save it to authorities. Say update. Stein. That speed. All right, So now if reload that one, that pile load se some very slowed. Okay, so now we have the command updates. Style. That's right. So select attacks to replace with a style. There you go. Nice. So if released this one, it becomes it should know. Be architects, Stein. All right, Now, how are we going to apply the TBL search? That's great. And you, the function it funds. See, let's say update style, too. We're going to copy except me, all of this, except that instead, off hard coating it we're going to use the get string function. We're prompting the user to enter the new style. Okay. And then what we're going to do is we have to validate if the still that the user enters is Valley Cory. If it exist in the table, they still definition. So this is what we're going to do it. If tbl search is now, PBS airs coming to May. Then we searched by style, then new style. This really we're checking it exist. If it does, then we do the program. Then we we execute all of this. All right. Otherwise, if it doesn't exist, we just from the Yusor style, the new style or the style that the user entered. It's not fun. Okay, so that's just about it. But before we execute this one, let's create our own style. It's a mystery. Create our on. Understand? Great. I weren't stuck in your style. Let's let me call this one Metallic bold. Okay, then the fun stuff. I should be bold italic. You can use the times New Roman. Let's make the huge factor too. So you can see the effect, by the way and apply so that we have here our new style. OK, that's the one we're going to use now. Let me just load the program that have made style can be explained to Well, we haven't save it. That's why save this one and noted again, you have an error here. Mother. Foreign Police. Let's check it out. It's OK. These okay? You missed the closing parentheses for the IV. A statement. There you go. He's okay. Yeah. Save it. No. Nice. Now we have the dates still to miss. Execute that. So we're now prompting the user to enter a new style. Let's try first. You the user type in something that doesn't exist, say whatever. Still, whatever. It's not fun. So our validation. And he's working Which music it drives to search from the style database and wasn't found. So you just provided this message here? No, this straight again with the valid style italics bold and enter. Now we asked the to select the text to be replaced with. That's straight. This one. There you go. So that's just about it. It's the use of the TBL search. All right, give this a try. Do some tweaking. However you like it and see how it goes in the next video. We're going to, uh, show. I'm going to show you the tbl next function, and that's you there. 76. 12: Hi guys. Welcome back in this tutorial, we're going to explore the TVL next function. We will create a simple program to display all the layers in the drawing. So as mentioned before, it's always good to have these comments on top of the code with the date and your name and answered the description of the function. Just so when you get better, these program that's a few months or a few years from now, but you're slipping into the description, you know, right away. What's the program is meant for? Okay, so let's start to create the program. We'll call this one as, uh, this play the years first we create a variable called flag and said it true we will be needing these plaid because we're going to look through the during database to see all the layers. No, let's create another variable. Let me hold the list for the TBL. Next results. Then we use the argument T for true. So when this is present, it really rewind to the first the layer in the database. If you reviewed ah previous videos that you target if theoretical explanations, you can see it there. So before we continue. Let's examine first. What's the output of the TVL next layer? True. This. Copy this one and based it here. It's What do we have here? Zero is the symbol time. We just didn't. We are exploring the layer database. Two is the symbol name, which is layer zero currently very Lear. Zero seventies. The flags 62 is the color, which is called her wife seven and land type is continues. Okay. You know, let's continue working on our program. We're going out to look to the drawing database. So while flag which means was true, continue processing. So that's no Prayed a Now they're variable that well, hold the value of the layer name. So based on these results, we are only interested in the association list number two, which is the layer name. Okay, so that's great. A variable called l name. And we are going to use the CVR association least up to in, uh, very of other. Okay, so this l name now, it will be this one here. Okay, Now it's to another validation. If make sure that the ill name it's not meal. Okay. Make sure that the ill name has a name in it, not the new value. So if there is ah layer name found And you just from the Yusor string cut their name then the learning the L name Otherwise thereis route set the flat to near So relax It also we have to execute the PBL next again so that it will move to the next layer without the key. Without this d if we have the ticket, we always start with the first layer name. So we don't need this one. Okay, but the prince here for a clean exit. All right, so let's review our code very quickly. Use initial is variable here and restored. Ah, TV is next least results into l prop We looked ah during database. While it's true, get the layer name. If it's not kneel than displayed to the user, it's Neil Then set the flag to kneel so that it will exit the loop. So every loop we have to execute the tibial next again so that it will go to the next layer and so on. Okay, let's say this one and let's call it the display There's that l s p load it this play layers Oh, sorry. Okay. Always slowed it. Then let's play layers. See how it goes. Nice. These are all the layers we have. Okay, Wait. Check the layers here. These are all the layers, right? And our code exactly shows the same missile players. Very nice. All right, so that's about it For the tibial next function. Try using these on your own. You can come up with some other ideas to let's say you use the study instead of layers or some other. Ah, some other symbol types, like nine types are views are view ports and see how it goes. All right, I'd see you in the next video. 77. 13: hi. In this video, we're going to develop a new program. I call it a CD. Um, the objective of this program is to check for modified dimension text, and if there are, we changed it to call a red. So it's always good to provide some kind of ah comments or the program description the function name, so that when you revisit the code sometime in the future, at least you know what? What is the program for? Why have you read in the program and when it was treatment? So So they do. So it's good to have that comment time up your code. So let's start developing the program. Now. We start with the defined function. See, we call it seeding. That's Ah initialized variable C M V echo to zero so that weren't appear in our command. Prompt first ob Let's initialize a counter variable then. Now we are going to get old dimensions being drawing. So let's start that in a variable called Deems, and they used this escape command filter out all the dimensions. Now we do a validation. So you, the deems it's not equal to kneel means we found some dimensions in the drawing. They continue program and this is our program else. If we don't find any we live from, we prompt the user that there's no dimension. All right, so is our code skeleton. I forgot to close Teoh. Okay, so these are our basically the scaffolding. Now we will be working on on this part here. So which means that we have a dimension. The dames is not equal to nearly means We have a defamation. So now let's great. Another selection said for all those dimensions that that are modified, so said que modify dimensions variable this beams. We used this Assad to initialize the selection set. Now let's have a count off the the dimensions that's been modified. They say the count, What is the length or the SS lint off the limbs? All right, so now we have to look through all the dimensions that's been found so that we can validate each of the Dimension entity if they're dimension text has been modified, so we'll have to do a while loop while not equal, while the counter is not equal today, number of dimensions close this while, so we process it here with a common tier. Check each off the dimension if the text more or less modified. Okay, no, we will get the name off. Each dimension object lets you store that intrigue variable called Denham as his name deems . Then they index at this time our contrary. Zero. This is the first basically, and it will increment us. We continue looking next we will get the property off this entity name. So let's just start out into a peen. Um variable, we get the property. Okay, No, let's check for the dimension text. Now that we have the property, we can now check the dimension text. Let's restore the dimension texts into viable called dim TX and you will get the the CVR off the association least up the property reaches the number one. So we're getting you association least up the the dimension text. Now we will just get the cdr means the second indicating the least. Then you will do another if ah condition here too verify if the dimension text has been modified. Usually if you do a dimension and you just accept the actual value the dimension text bees blank for nothing. So it just accepts the default value which is correct. But if the user, for example, modified a text and and there's some kind of value which isnot burial distance between the dimensions, so it means that has been modified. So if a dim T X is not equal to a blank string, which means that it has been modified, then we are going to that the entity into our selection said. Here is the modified their measures, these our initialization. So that's as the modified the dimension into the selection said So M deems this is odd. The name of the dimension to the Indians. Okay, then we close the if statement, and then we will increment the counter. Seven q cpr, one blast CPR intimated by one. So let's say we have our dim countess. Five. They said. There are five dimensions in the drawing is when we look five times and every loop. It will validate each of the dimension and check the the Dimension Texas been modified. And if it is, then it will. Adding to the modified dimensions selection set. Okay, so this is now complete. Now, after the looping is done, we need to very fine now. If our modified dimensions has something in in it, Let's say, if not equal to s, then modify dimensions that equal to zero, which means that we have a modified dimensions. So we do another broken. Since you will be putting a multiple expressions these now we're going to do the see. It's prob to change the color to red so that the user can easily see all of dosage damages . That's lifter modified so we can after the issue a Sears from common right here. It's a huge problem. Select object those modified dimensions and third and color C for color. Then which brother? Let's read or you can changed it however you want and enter. Then just from the user. Coordinate the the message. Let's say there are in figure toe askey as this length 25 dimensions money right that mentions just to give a use for information and home in the dimensions have been modified. It is very, very important if you are working on chef drawings in a complex plan or sections or elevations. Uh, sometimes the the user is not very careful. Just changed the dimension text to fathered architectural drawings, but it's not really doctrinal dimensions, so at least with this program will show up all of those that's been modified. Then do another frontier. Just please verify mentions in red color. So that's it. Give this a try and see how it goes. You can. I tried to come up with some of the dimensions that you modified the value and C they appear. Was the program miss Run here in red? I mean, okay. Will do more some other programs in the next videos and see you there. 78. 13: Hi guys, the Strait and other program. We will call our program ch style. The objective of the program is to do a global Texas style change. Using the table search function, I will also introduce some new functions or concepts. So if we check the style in this drawing, we have five styles. We're going to use the standard in the architect style. If we examine one of these text here AM text. This style is standard, so we will replace this style with architect, all of it with the standard style. Let's start creating our program. This is the function name. It's a description, the author and the date. That's great. They function the fund see ch style. Ah asked the Yusor for the old style to be replaced. We're not doing hard quoting here all all should be dynamic. Old style gets string enter style to be changed. You also created variable for the new style. Get string, enter a new style. You create our flag. True So we can used that in our condition. Now let me introduce the the function called con. We've discussed this in a previous video. Theoretically now we're going to use it in in in our program. Basically, we are having different conditions here. 1st 1 is if Neil that we're going to do a tibial search for the style database for our old style. We're going to check if the user enters style that's existing, but it is equal to kneel, which means that it doesn't exist. We just do if princey old style, not fun. And we set the value of plug to nil. All right, close that their fantasies. Now we have to put in another validation, the expression for the new style. We do the same thing. We search for the new style in our style database just to make sure that it exists. Otherwise typing new style, not found. And then we set the flag to me last minute. Close it that Now, if they are both existing, we can now set the flag too true. And then we will call the function changed style, passing on the old style and the new style. So this function we're going to create do fun, change the style specified parameters here, all style, new style. I will also introduce these local variables. We'll discuss that later on once the program is complete. No. In this function, we're going to gather all the text. It's called the excess, and we do an SS Get with the least and you create a 17 We're selecting based on style, old style. So give me all the texts with the style specified by the user here. Okay. And then we grade another variable for the counter. But before that, that's validate first, if not equal to meal. The T x s means reports, um, functions. I mean, refund some text. We do have broken close the If program. All right, now we do a You said the counter to zero and we create another variable called the count, which will hold Ah, the lent off selection said how many objects that we have in selection said Just close the program here before I forget. All right now we can start looping through the selection sets a while the counter is less done. The t count. We keep processing. We just create a prompt here. Who, coordinating the message with the progress of the object that's being processed. Notice there are here instead of and and means great a new line. So every time the loop process message on a different line, but in this case, it just stays in the same line. But the counter keeps increment ing processing object number. Then we used the interior to ask. That's the mess pressing object number. Let's say one off the account of the object into your toe. Askey pecan. Okay, now let's get the entity Name of the first text in the selection said. Let's call it the p X, Nasa's name, the excess and the CPR. We'll get the data definition of the T X started in a the XP and get TX. Then we do the substitution, starting a new variable. We should already be familiar with what I'm doing now. Based on the previous video, when we discuss about the outward objects reexamined seven near style, then the association least seven of the XP in from the Sea experienced. Then we do the and mud the XP in Bothered by the end update up the DS that, of course, we increment the counter for the next text entity. All right, so that means to introduce another function called Terra Pre This. Just insert a new line in the drawing I mean, in the command line. Nothing. The drawing to command line. So Princey done. Okay. However, what if the the excesses nil means nothing? No text pounding this style. So all we have to do is just by the message, though. Object found in specified Styler. All right. Looks like I doubled text here. Step needed. Did you know? Let's go through the code first. Just to make sure that we have all valid parentheses is correct is correct. Programmed closes here. It's OK. All right. Looks good about here. Okay. Mexico, huh? Okay, let's save this spider ch style that l s P Now we load it. Before that, I forgot one thing. Let me just go back to our code. The same mentioned earlier. We're going to use the local variables. These what I was saying All of these variables that we declare in this code block, we will make them a slow KAL variables by putting in this forward slush and then the variables variable names. Which means that after this code runs, all of them are set to kneel values. That's a good thing because they have no chance off interfering with other processes. Let's have some other program uses, the same variable names that might gives unexpected results. So these a good breakfast Once you're running a particular module, keep the variable Slocan. So once it's done, they all said Two middle values. All right, let's save these again and reloaded. All right, we have an error malformed, least on input. Let's check it out where you can get some error. Yeah, remains the one parentheses here. Okay, save it and reload. Nice. So now let's run our code ch style. Enter Still to be changed. This is standard. Let's do a negative validation. First, we'll enter anything that that's an exist new style. The same thing. Look at the message, all style, not found, because in our Cody, validate first for the old style. Now it, let's say, re enter a valued old style and new style that doesn't exist. It says you're a new style, not bound, which means that it passed through here, but it failed in this condition. Now let's try running it again with both valid values, standard and architect with the proper casing. So all of this should now replace the style with architect Nice. Okay, so now if we check all of these values here, this value should all be Neil. Yes, sir. Just locally declared. Right. So let's start with the excess Neil CPR. New. Okay, so that's it for this program for this lesson. Hopefully, you get more information in this and reinforced your existing knowledge on the subject. Thanks for watching. And that. See you in the next video. 79. 13: hi guys. In our final project, the program that we're going to develop is to extract the attributes values a swear less the insertion point. So I have here the simple drawing really different values for each. They just made it. 23456 And so, uh, kilovolts, we also have one here for the transmission just to illustrate how we can extract attributes . So if we examine one of these blocks you have here, duh, the boat age value and the type of cable did not may miss cable. Okay, so we're going to export the attributes. A smell us demonstration points into a CSB for my so we can open it in excel. That's right, our code. So I have here, uh, comments for these function. Let's call e e x t a t tr were extract attributes. All right. First, let's prompt the user with the location of the file or the folder using the gets string function contar my location. Then we bumped for the file name. That's name our variable F name. I used to get string us. Well, center file name. Now we composed the full while name with the pot. Let's just name it File name Michael coordinating the folder, the F name. And that's just hard coded for now for CSB. This can be recently modified pending on our requirements, but for this particular objective were just used to CS before my Okay, Now we can open the file. Let's say you call it F for the the actual file that the interest will be creating for us. Open. It's the function, then the file name. Then we have here there how the heart is the expression for right. That would give a spore right ours for read. So in our case, we're going to right or fight. So we opened it for writing. There is our dearest W. There's a ace for a pen, which means that if the file them that specified is already existing, it will offend at the last entry in the text file or in the CSB file. If it's w will overwrite the fighter. Okay? No, it's gather all the blocks in our case, the cable. Let's call it the LKS. We used the SS get function zero for insert that is the object type and two for the block name, which is cable Okay, now let's initialize our counter CPR to zero. Let's also get the length off the blocks using the SS length. All right, let's Ah right, our heather or the fire. To do that, we used the right line function and we can coordinate the cable type bolt age. You need the X ordinate. Let's just call the cord. Why coordinate? That will be our header than we are going to write it to a file, which, in our case, if this is doing here, Okay, now we are ready to look through the blocks in our selection. Said we have reduced the while loop while not equal counter to the length off the selection said, start the processing straight here from. And then just so the yusor conceded progress. Basically, what we're doing here is provided you, sir, with the progression, the status, let's say pressing one off something to up something and actually let or the number of blocks in the selection set. Now, let's get the entity name off. The first blood in our selection set the school that be okay, missus Name from O R selection set than the index, which in our case, counter and then we're going to get the property of the block missing. Then get this time. We can now get the insertion point. Let's call that in Speedy, which is CDR. I saw a 10. The Bill KP. That's bus for a while here, let's examine the blood content. That's a set. Your A Just grab one block this navy smart, and then you get the definition data that block. So this is where we're at. Now we just get the the finishing data, which is this one here. Now we're getting the insertion point, which is the association least a 10. This is really what we are interested in. You just get the X and Y. We don't need to see Okay, No, let's get going. That's great. A flag and said it true because we are looping through the sub entities off this attributed block. Now we'll have to look true. The their blood attributes. So why was true? You're going? Let's get, uh, property. Look, the the next entity or the next sub entity. So in this case, we are just in the main anti richest A insert. If we go to the sub entity like going through each of these attributes. We need to get the end next off this entity. So said Q. Let's say it's going to be and get a next up CDR. I saw minus one off Call this. See? This is insulating. Be R b. See this one? We're now in the attributes and this is our first god. The voltage, right? We do that one more time. Let's say set Q D and get A and next up CVR eso minus one off the of See. So these our second pad cable type, which in this case, the value is distribution here. Okay, we do that one more time. That's a story. Invariable e. We do it from the the next up be we now have the sequence and here. Okay, so that is where we're using this. Why look to look to the attributes In our case, it's just two attributes. So this program runs very fast. Let's do the and get and next up CVR I saw minus run of the KP one year. Okay, now we can get the the type of the block. Is it already at a tree? Or it's already sequence and is our filter or I mean our validation. So let me get the bill K type cdr assault zero of bl k p. Now we do the if statement blk type is equal to a three. When we do it program we we can get now the tag name the shown in this example Here we can get the tag name reaches the voltage pack Name cdr saw two Ah bl k p Now we didn't We'll have to validate again. If the tag name is equals to bolt age, we will get the voltage value store into voltage variable Sceviour. I saw one off B A k p. This one is our tag. It's it's a voltage. Then you will get this value, which is the five cave. That's the objective of this condition. All right. Also, we have to check if the tag name is equal to cable type set Q. What? It's the the Togni Risk Able Type. We're interested in the type which is distribution sick. You cable type CDR s 01 of Bill KP. Okay, so But if let's say the blood type is it's not a tree, then we are going to sit the flag to kneel, which means that it is already ah, sequence and he treats the end of the attributes. So the flag, it's Neil. Then we will accept it will accept the wild close day. Okay, now we're going to compose. Since we have the world stage, we have the cable type and we also have the instruction point. Let's know, compose O R. Ah, data that we're going to write into the file. Let's call that s cable info. We're going to Captain eight, the cable type Read a comma and the voltage. Now we we're ready to write to the file. Right line. We still have to come cut in it because of the X and Y coordinates. So patented the cable info, comma and x coordinate. In this case, we have here that here the insertion point, we we are going to need really to string function to convert the car in Speedy. This is the X coordinate pilot break comma and also the rial to string for the y coordinate . So since it's the second element of the least, we are going to use the c A d r and ready to file. All right, so that's the first pass. Next we have to increments our counter for the next entity. So we just keep on looping until the counter reached the length off the selection set. All right, then, after that, we cannot close our file. Don't forget close to fight. Otherwise the CSB filed that great that we let be open. Then we can just provide some information. Here. Make procrastinating the the sentence this super by the use of Cem Status update extraction is complete. Then you're with your file. Name us being created. Okay, so these is now our code. Let's go through it very quickly. First time we just prompt the user for the path. The location. Second line we prompted with the file name Third line recomposed the actual final name with the CSB extension. This can be modified later on. To be dynamic, I leave it up to you for your enhancement or your for your own specific requirements. Then we opened the file with the W expression too. Right Next we gather all the cable blocks drawing re initialize our counter to zero. We get the number off and titties in our selection said from here. Then we we write the header and we live true, the entire selection said, Get the first object, then get the properties. Now that we have the properties, you can get the insertion point. We created this variable for our looping, knowing this cold blood, we're just looping through each off the the attributes by going through the sub entities of the block know that we get the block type. We validate if it's a tree. If it ISS, then go and find a tag Name. The tag Name is voltage. Get the world stage value. The tag name is cable type. Get get the cable type value. Otherwise said the flag to kneel. Certainly exit the loop means it reached the end sequence. And then here we composed our ah cable information. Then they write good to file with the X and Y coordinates in the incriminated the counter. Finally, we close the file and provide message to the user. All right, let's save our file. That's called is a e x t 80 tr point ls B. It's not our Fine. Okay, that's run it. So inter file location with me. Andreas is my path and C cables cable extra. Okay. Do few argument. We have one error. I think that. Okay, find the problem. We missed the A soft one here. All right, so let's save this file and loaded E x t 80 tr. Let's specify our file. Location. Four baths. Okay. No specified file name? It's a cable info. Okay. Enter HAGO. Extraction is complete. He's our father has been created processing than of nine. So let's check our grated file. Yeah, Cable insult with the size of one kuna bite opening up. You hear this? You have the use, our header. And these are our values. We have how many We have nine, nine of nine. Okay. And these are the voltage est from 23456789 and one transmission. And these air old exc ordinates. And these are the white coordinates. You know this that why are the same? The Y coordinates are all the same because they are aligned. But the X are different. So if we look at these Ah, the two available block. This one here. 988 and 4843 Great. I'd be the instruction point of this bluff. She's here 988 and for a 40. All right, so this concludes our projects, Try during some changes on this file, my adding some more validation or making the the files type to be different. Choose XLs or TXT spending on your requirements and see how it goes. Okay, the next video where we're going to conclude our tutorial. Thank you very much. 80. 14: Hey guys. In conclusion, I would like to congratulate you for finishing this course. I hope you are now comfortable programming in arteries and also have a deeper knowledge of AutoCAD within you. Learn skill and tool in your toolbox. You should know, be able to create functions that you can use in your daily tasks. Be it smaller, big for a slum unless it helps you in your work. It's always a good thing. It's just the beginning, and I encourage you to build upon this knowledge and continue learning the more advanced functions of Italy's keep developing applications and happy coating. Thank you very much.