That's how the Python code gets integrated. When you run a docked command, the program creates a C# helper class that is basically a native C# command with the properties of the Python script inside it. If using python class, WPF will automatically generate property for each named control TrimbleColor (select a color from a list)Ĭan create window directly or create class that inherits from Window NameEdit (enter/pick an object to use its name) TextStyle (select a typeface, font, and styles from a list) LineStyle (select a dashed or other style for lines from a list) LeftRightEdit (select the side of a line looking down the line from the starting station) VerticalAngleEdit (enter/pick two points in a profile view for a vertical angle) StreamingCoordinateEdit (click-and-drag to create a line of CAD points) OffsetEdit (enter/pick two points for an offset) MemberSelection (select multiple objects) Currently, the available controls include:ĪngularEdit (enter/pick two points for an angle)īearingEdit (enter/pick two points for a bearing)ĬomboBo圎ntityPicker (select an object from a list)ĭistanceEdit (enter/pick two points for a distance) Most TBC commands use 'custom controls' to allow you to select and enter values for coordinates, stations, layers, etc. Browse to the C:\Program Files (x86)\Trimble\Macros SDK folder to find the assemblies. You should set the Browse option to "Custom Component Set" and use the "." button to add TBC assemblies. Note: You can easily display online Help by pressing F1 as you browse. You can use the Object Browser to find classes to use. In addition, you can see the procedures and constants that are available from object libraries in your project. This helps you understand what classes are, where they are stored, and what you can do with them. The Object Browser allows you to review all available classes defined in the DLLs in your project to see their properties, methods, and events. The easiest way to find the properties of an object is to use the Visual Studio tool Object Bowser tool. In this case, the assebly namespace is and the class name is Circle. If you run TBC and create the objects you want to add/modify in a macro, you can then use the ViewProjectData macro to see the objects name and what collection it was placed in.įor example, if you create a circle in TBC, then ViewProjectData will show you a was added to WorldView. This linestring would exist in the database but untill you add geometry, it will not display. So if we want to add a linestring to the WorldView container, the python code would be like this: To create an object you just need to call the "Add" method on the container that should hold the object. To set the objects layer, you set the Layer property to the serial number of the layer. The serial number of the layer collection is "6". The ViewProjectData macro shows the SerialNumber at the end of the object name. This is a unique unsigned int that is used to reference objects. Objects created in other views (like sheet or profile) are not stored here.Įach object has a property called SerialNumber. Things like alignments, surfaces, polylines, etc. That is the collection where most objects a user creates are added. There is a collection under Project named WorldView. Collections like TextStyleCollection, LineStyleCollection, etc. You can see other collections under the project object. You can see those two layers under the layer collection. When a new project is created, two layers are also created (layer "0" and layer "Points"). Inside the layer collection object are two layers. As you might guess, this is the container where Layers are stored. The project contains many members in its list of objects. The top node in the tree is the "Project". There is a TML that shows this tree structure (ViewProjectData). Each object may have properties and also contain other objects. The TBC database can be thought like a file system where the top level (like C:\ in a file system) is a class called Project.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |