Jump to content

Miguel Barrera

Member
  • Posts

    663
  • Joined

  • Last visited

Everything posted by Miguel Barrera

  1. All the vectorscript (or minipascal) plugins were open before VW was sold as different design packages/modules (version 7 and 8 if I remember well). That is why I wish I could help you guys with the stair PIO but since I own Landmark I do not even have access to it. Can someone explain what benefit is there in linking to an external database. I see this wish posted before but I have worked 25 years on CAD systems and never had the need for it. And perhaps nobody has developed the feature because there is not enough market to justify the investment.
  2. By including the proper libraries, one should be able to tap into ODBC/SQL with the SDK since it is a system wide programming environment. Visual C++ is used to build executables (*.exe) as well as extensions (*.dll), such as PIOs in VW, and provides access to all the operating system. ODBC translators for most popular database formats are either included in the system or are easy to obtain from the database vendor.
  3. Most likely Active X and VBA will never happen since these technologies are for Windows only. AutoLisp is comparable to Vectorscript and ObjectARX is comparable to the VW SDK.
  4. I guess where we disagree is whether the PIOs are external to VW or not. I consider them an integral part of the package they are used in. NNA designed it this way so they could sell you the package for each discipline and include only those features that were relevant without changing or hard coding the functionality into the base drawing engine. I am not sure what you mean by this. NNA provides Vectorscript for limited and faster programming and the SDK for more robust applications using C/C++ with XCode or Visual C++. ACAD and Microstation have similar programming environments. One feature I liked in Microstation though was the ability to record user input and getting the Basic source code as a starting point.
  5. You can check the box "Dimensions Always Inside". If you change your mind and want them outside, you can always drag the text to the outside.
  6. Christiaan, If you had bothered to read what Apple offers, you would understand what I said. This is Apple's statement on open source Meaning that they incorporate open source technologies into the Mac OS and are available for developers to use in their applications or device drivers. Nowhere does it say that they provide the source code for the Mac OS itself. Furthermore, there is no source code to download on that page since what is offered comes with the Mac installation disks. I have been around since the beginning of personal computers so I know how the Mac OS X came about. The use of Unix as the underlying OS is no coincidence since OS X was developed from the purchase of the NextStep OS, a Steve Jobs creation, and which was based on Unix. The reason you have emulation programs like Parallels is that they do not have the source code for Windows to compile it and run natively on a Mac. What the program does is map function calls from the guest OS (Windows) to the host OS (Mac). In the same way, I was able to emulate Mac OS X on a Windows computer. Linux would be an example of an open source OS which you can download and install on about any computing device around including game consoles and portable devices. Since everything is open source, you can develop your own version of the GUI and improve any feature or modify any aspect you do not like. Lastly, you proved my point that what is offered is the means to make your own applications but not the source code. Webkit is a SDK (Software Development Kit) to build internet applications but is not the source code for Safari. You are free to make your own web browser with the kit if you do not like Safari. For example, in learning Visual C++ on Windows, I built a web browser myself with two panes. One for the searched page and the other to display the links on that page.
  7. I believe you are confused as to what Apple publishes. What they offer are SDK's of core technologies and the programming environment that comes with every Mac so that developers can create their own applications. If the source code was published it would be very easy to port the Mac OS to other computers besides the Mac and then they would not be able to sell you their own brand of computers. I do not see the difference. The PIOs are pieces of software that make up the different modules (Architect,Landmark,etc.). NNA could very well have added these pieces of software into the main VW program and then you would not have an argument. NNA is simply protecting their investment in developing the PIOs. And just like Microsoft and Apple, NNA offers the means to make your own applications (SDK, vectorscript, documentation, and examples). The stair plugin can be duplicated and improved by a third party just like Windoor by Julian Carr is an improvement over the stock window and door PIOs.
  8. I know what you are talking about because I develop plugins myself. The ability to encrypt the source code was introduced to encourage the development of third party plugins for profit and to protect the resources invested in developing the plugins. Software would have no value if everybody knew how it was done. As I stated before, any software can be reverse engineered and the least you can do to protect your creation is to make it hard to copy. Do you remember how Microsoft copied the Mac OS?
  9. That is the same as asking Microsoft, Apple, or any other software company to publish their source code. What would be the incentive to create software if you cannot make a profit? If you do not like what is available, then you are free to make your own. Any application can be reversed engineered.
  10. Global variables do not take more memory than local variables but because they exist until the program ends, the number of global variables may affect the amount of memory available. For example, if you are looking for an object with a defined attribute and you are going to modify it later in the program, it is a good candidate for a global handle to the object. All the other variables needed to search for the object can then be defined in a function or procedure and they will only exist while the function executes. PROCEDURE Example; VAR {these global variables exist until the program ends} objHandle: HANDLE; objAttr: INTEGER; FUNCTION SearchForObj(objAttr: INTEGER): HANDLE; VAR {these variables only exist while SearchForObj executes} curAttr: INTEGER; searching: BOOLEAN; curObj: HANDLE; BEGIN curObj:= FInLayer; searching:= TRUE; WHILE (curObj <> NIL) & searching DO BEGIN curAttr:= GetLS(curObj); IF curAttr = objAttr THEN BEGIN searching:= FALSE; SearchForObj:= curObj; END ELSE curObj:= NextObj(curObj); END; END; BEGIN ..... objAttr:= 2; objHandle:= SearchForObj(objAttr); ..... END; Run(Example);
  11. If objects inside the symbols are not changing is because they are not using the class attributes. Edit the symbol and use the attribute palette to change each object's settings.
  12. The only problem with reusing the same variables for different data is that you may loose track of their meaning. I encapsulate variables for temporary use in procedures and functions to limit memory usage and use global variables only for data that will be needed throughout the program.
  13. Would it be more beneficial to have this info in a worksheet? That way you could print it or export it as text (.csv) for use in Excel, etc. How should the color be reported? by number or RGB. These are the only values that can be reported with VS.
  14. You cannot modify an image in VW except its size. The best way is to edit the image in a paint program and then import it.
  15. Is there a way to make a resource file (.rsr) without requiring a Mac to make the translation for Windows?
  16. Which handle are you passing to the procedures? You need to get the PIO handle from: FUNCTION GetCustomObjectInfo(VAR objectName:STRING; VAR objectHand:HANDLE; VAR recordHand:HANDLE; VAR wallHand:HANDLE): BOOLEAN; and use the handle returned to get and set the end points such as: GetSegPt2(objectHand,x,y);
  17. Once you have defined the length and/or direction reset the Linelength parameter (sets the length only) or use SetSegPt2 function (sets the length and direction)
  18. The steps to add the title block to a new sheet layer do not seem right. If the record was linked to the symbol with text corresponding to record parameters/fields, you should not have to link it again. Every time you add the symbol, the linked record should be already checked in the data tab. When you create records, you can also enter default values for the parameters/fields. If you add a symbol, the record will be populated with the default values. The easiest way to do this is to add the symbol on sheet 1, edit the record accordingly, copy and paste the symbol to other sheets, and finally, edit the records of the pasted symbols. I would also suggest that you have the drawing border and title block in the same symbol instead of two separate objects.
  19. Yes, I believe it is a bug since it is not giving us the result expected if we follow the language guide. Using a single string for the criteria should also be documented in the guide. Although I have not needed this functionality, it is nice to know that you can build the criteria as a single string also.
  20. Pat, I ran your script and as you said, the first count returned 0. However, I changed the variable names to cls1 and cls2 and the code executed correctly. Procedure Test; Var cls1,cls2:String; Begin cls1:='None'; cls2:='C=None'; Message(Count(C=cls1),' ** ',Count(cls2)); End; Run(Test); It seems that the variable name has to be 4 characters or longer for the code to work.
  21. The following is straight from the VS Language Guide Search Criteria Format Syntax Search criteria in VectorScript are composed of two parts: the search attribute type specifier and the search value. The search attribute specifier indicates which attribute will be used to filter objects in the document; the search value specifies the value to be found and matched by the search operation. For example, the search criteria term: (C=?Edged?) indicates that a search should be performed for any objects whose class is Edged. In the criteria term, the C attribute type indicates that the search should be performed on the class attribute of objects in the document. The search value Edged indicates what class will be a match in the search operation. Unless this was changed in VW 2009, it has worked for me since the addition of records until 2008 which is what I currently have. Could this be a bug in 2009? If so, it would be another reason not to upgrade because all the programs I have developed use this format.
  22. Brudgers, Rather than using a window to select the zero thickness crop object, it may be easier to just select all (Ctrl+A) since there can only be one object.
  23. Pat, I do this all the time. The C for class is not a string. I have not used this in a while but the following also worked for records: recName,fieldName: STRING; (recName.fieldname < 100')
  24. #1 - As was stated before, VS is based on the pascal language and do not believe you can have functions as Array parameters. #2 & 3 If you want to have more specific criteria, it is doable with ForEachObject as in the following: PROCEDURE Test; VAR gTotObj1,gTotObj2: INTEGER; FUNCTION CountObjs(layName,className: STRING; maxLng: REAL): INTEGER; VAR totObj: INTEGER; PROCEDURE ProcessObj(objHdl: HANDLE); VAR objLng: REAL; BEGIN objLng:= HLength(objHdl); IF objLng < maxLng THEN totObj:= totObj + 1; END; BEGIN totObj:= 0; ForEachObject(ProcessObj,((L=layName) & (C=className))); CountObjs:= totObj; END; BEGIN gTotObj1:= CountObjs('Battens','TH4050',400); gTotObj2:= CountObjs('Battens','TH4055',600); END; Run(Test); #4 - You need to explain this one because I do not understand what you are expecting. DoMenuTextByName works for menu commands and ResetObject works for plugin objects.
  25. You can access menu commands with the following: PROCEDURE DoMenuTextByName(subMenu :STRING; index :INTEGER); The submenu is the menu command and index only applies to chunk menu commands such as group and views. DoMenuTextByName('Convert Copy to Polygons',0); DoMenuTextByName('Cut 3D Section',0); or DoMenuTextByName('Standard Views',8); which sets the view to right isometric. The command names are in Appendix H of the function reference. The only problem with using menu commands is that required objects need to be selected and if objects are being created with the command, there is no easy way to get a handle to them. LNewObj works in most cases but if not, you have to do some trial and error to get the right handle.
×
×
  • Create New...