Jump to content

VvierA

Member
  • Posts

    182
  • Joined

  • Last visited

Everything posted by VvierA

  1. I have a script that converts Polygons in a custom object named 'db Allesstempel'. The workflow is: you select one or more polygons, you call the script via menu command, and boom: the script converts the polygons to this custom path object named 'db Allesstempel'. The problem is: It worked fine for a long time but since one of the last VW Updates it does not work within annotations of viewports if I want to use it on MORE than ONE selected polygon. It stops with this error: error on line... SObjectHandle[zaehl] := objectH; ... ZAEHL - index outside array limits: Why does this happen? There is a function "H_FSActContainer", that checks what's selected. This worked fine for a long time, even within annotations. Now there seems to be a problem. Can anybody help? Kind regards VvierA -------------------------------------- PROCEDURE allesstempelkonverter; VAR objectH, newobjH :HANDLE; SObjectHandle :DYNARRAY [] OF HANDLE; numsel, zaehl :INTEGER; FUNCTION H_ActContainer: HANDLE; BEGIN BeginContext; Locus(0, 0); H_ActContainer := GetParent(LNewObj); DelObject(LNewObj); EndContext(0); END; FUNCTION H_FSActContainer: HANDLE; VAR h : HANDLE; BEGIN h := FIn3D(H_ActContainer); WHILE (h <> NIL) & (Selected(h) = FALSE) DO IF Selected(h) THEN H_FSActContainer := h ELSE h := NextObj(h); H_FSActContainer := h; END; BEGIN objectH := H_FSActContainer; numsel := Count((SEL=TRUE)); ALLOCATE SObjectHandle[1..numsel]; zaehl := 1; WHILE (objectH <> NIL) DO BEGIN SObjectHandle[zaehl] := objectH; zaehl := zaehl+1; objectH := NextSObj(objectH); END; {message (numsel,' Zähler ',zaehl);} {in der zweiten Schleife werden die Objekte umgewandelt} zaehl := 1; WHILE zaehl <= numsel DO BEGIN IF (GetType(SObjectHandle[zaehl]) = 3) OR {Prüfung ob es ein Rectangle ist} (GetType(SObjectHandle[zaehl]) = 4) OR {Oval} (GetType(SObjectHandle[zaehl]) = 5) OR {Polygon} (GetType(SObjectHandle[zaehl]) = 6) OR {Bogen bzw. Kreis} (GetType(SObjectHandle[zaehl]) = 21) THEN BEGIN {Polyline} { SetPenFore(SObjectHandle[zaehl],45);} newobjH := CreateCustomObjectPath('db Allesstempel', SObjectHandle[zaehl], nil); END; zaehl := zaehl+1; END; END; run(allesstempelkonverter);
  2. @Hippocode The hint with exporting as a script file is really great. It didn't help me to solve my problem, but I think this method can be very helpful in lots of 'programming' situations. And of course I will consider purchasing one of your plugin bundles. They look very interesting too.
  3. @Hippocode Thanks for the helpful and interesting info. Can I ask you how to export a single linear dimension? I haven't done that yet... And another question... Is your tool 'standalone' or do I need to purchase one of your plugin sets? Thanks again, VvierA
  4. Hello, I'd like to have access to a parameter of the built in dimensioning tool: When I activate a linear dimension, object info palette shows mit the length of the dimensioning as a parameter. Is there a way to retrieve this information via Vectorscript or with a function in a spreadsheet report? Thanks for help VvierA
  5. @Miguel The symbol within my PIO has some text that is linked to a database record. I like to read out this info an write it to the PIO parameters of the parent PIO. Why would I do that? In some cases I'd like to edit the database record entries from within a worksheet list. Vectorworks changes the info in the text symbol that is linked to the database accordingly. The problem is: the correlative parameters of the PIO do not change automatically. If the PIO gets refreshed by another reason (for example resizing etc.) the database entries will be changed back to the values that are still 'stored' in the PIO parameters. Therefore I'd like to write a script to sync the database entries to the PIO parameters. Maybe I can work out how to traverse the PIO and how to identify the embedded symbol thanks to Miguel. I'm not a Pro so any additional help will be appreciated very much.
  6. Ok, thanks again. So I can cycle through the objects within the PIO. One of them will be a symbol. You surely have an idea how to identify the symbol and how to get a handle to it? I did some research in the Vectorscript reference but I am still not sure, what to use. Thank you and good evening
  7. Sorry for asking again, but I don't know really how to traverse the PIO to get a handle to the symbol within. I have an handle in an array of handles to every PIO I'd like to check for contained symbols. I thought, I could look 'inside' every PIO with.... ForEachObjectInList(actionFunc, objOptions, travOptions, list) With travOptions = 1 I should bei able to traverse inside the PIO. But what's the 'actionFunc' to get a handle to the symbol inside the PIO? And what do I use vor 'objOptions' and 'list'? Thanks for help again
  8. @Hippocode Thank you for the help. The background is: I can generate a list on a worksheet with the database info of the symbols that are embedded in the PIOs. I can edit the retrieved database info in the worksheet. If the database info was linked directly to the object, Vectorworks would rewrite the data to the object. Because the database info is linked to the embedded symbol and not to the PIO directly this does not work. Therefore I'd like to read out the edited database info and send this info to the parameters of the PIO to match both. I think I'll try this: I can get a handle to each PIO. Then I search within each PIO for the symbol with record information and get a handle to this. With this handle I read out the record entry for the symbol and patch it to the PIO parameters with the PIO's handle.
  9. Hello again, thanks for the help with the other issues. I have a 2D path PIO with an embedded symbol. Does anybody has a clue how to get a handle to a symbol that is nested inside a PIO? I'd like to make another Vectorscript to manipulate the POI objects inside the drawing. Therefore I need to get a handle to the symbols inside the POI objects. Any ideas?
  10. Sometimes you just need to talk about a problem to understand and to solve it. I used GetRField and SetRField to read record data and write it to a parameter. But now there is another problem. Please see my new topic...
  11. Simply in other words: I'm looking for a vectorscript function, that allows me to read out a record field and write it to a the parameters of a 2d Pathobject?
  12. New info: I just found that I can select ALL the objects at the same time by right clicking the row of a list (the first row, that contains the search criteria). Now I have another problem: Each of the listet items is linked to a database record. I'd like to read out the record for each item and write the record entry to the parameter of the item.
  13. Yeah, thank you for the quick response. But if I use the worksheet criteria in my script, the script only works with this certain worksheet. Or is there a way to read out the criteria of a list? Maybe something like this? I click on the first row of the list and call the Script with the contextual menu (right mouse button). The script 'reads out' the criteria of the list and selects each item.
  14. I totally agree with zoomer. Most of the users can't imagine the benefits of substantial changes once the got used to some piece of software. People are very anxious with changes. It's a general problem. That's why VW became overloaded with features over the years and why the user interface became overcrowded and confusing. The developers don't dare to streamline the software and to modernize it substantially. Instead they just add features every year. (Sorry if that sounds a little bit harsh but I can imagine how difficult it is to evolve a piece of software that has such a long time client base.)
  15. Hi there, maybe someone has an idea..? I've created a worksheet list using some search criteria. Now I'd like to select all the objects at the same time, using a Vectorscript. I know that I can click an a worksheet list entry and chose to activate it in the drawing, but I'd need some script that activates or selects all the objects at the same time... Any idea? Thanks for help, VvierA
  16. @Hippocode Wow, very cool. I don't know, if I can handle this, but I will try. Thank you very much.
  17. I'd like the following usage: - select the tool - hover over the drawing with the cursor - VW should highlight the graphic elements while I hover (could be everything - not necessarily a custom object) - I click one one of the graphic elements while it is highlighted - my plugin object retrieves information of that element and my object is placed right there where I clicked - the plugin object shows information of the element like a stamp (for example the area of the element) And yes: maybe it's more like a custom tool than a custom plugin object. Do you think, I can succeed by making a tool rather than a plugin object? Thank you, I will have a look at it. Maybe it works.
  18. Hi everybody, another day, another challenge... I'd like to make a custom point object with the following feature: When I hover with the cursor over drawing elements they should highlight in the standard Vectorworks manner. By clicking on one of the highlighted elements the plugin should retrieve information of the element (for example the area of that element). Does anybody know, how to do this? If I make a new custom point object and start it, there is no highlighting while hovering over the drawing. And in the next step I wouldn't know how to get a handle to the element I clicked on. Thanks for help VvierA
  19. @Dieter @HIppocode Thank you both very much. I think I get it. I will do it separately.
  20. I've done that before. I programmed a plug in object as a tool. Then I programmed a menu command, that called that plug in object to generate several instances of it in the drawing. Now I'd like to merge the two pieces of code into one. Why would I do that? Because I don't need the plug in object as a separate tool. I only need it in combination with that menu command that populates the drawing with instances of it. But maybe that is not possible and I have to do it separately.
  21. Well, I am looking vor a custom object, that is generated by a menu command. I know that it is possible to program a custom object and to 'call' this object from within a menu command. But that is not what I want. I'd like to generate the custom object directly with the menu command. In this special case I'd like a symbol to be part of the newly generated custom object. What's the purpose? I'd like to program a stamp, that shows the area and perimeter of polygons. It is used by selecting polygons and applying a menu command to call a Vectorscript. The menu script reads the area an perimeter of each polygon and places a symbol with text showing the area and perimeter next to each polygon. I'd like the symbol to be part of a custom object. So I can access the object info palette for this 'stamp object' and make changes, for example select another symbol or scale the symbol and so on.
  22. Hello Hippocode, thank you for the input. If I am right, my problem is: The 'CreateCustomObjekt' commands need the name of the object. So I have to create a custom plugin object tool with a certain name in the first place to use it within my Vectorscript menu command. I would be happy if there was another way. I'd like VW to create custom objects directly by only using the Vectorscript menu command. I'd like to call the menu command and than it should populate the drawing with symbols that are not only symbols but custom objects.
  23. Hi there, I made a Vectorscript menu command that automatically places symbols in the drawing. Now I'd like the Vectorscript to 'convert' the symbols to custom plug-in objects. The purpose is to have access to the parameters defined within the Vectorscript menu command from within the object info palette. The Vectorscript command should 'transform' the symbols to custom plug-in objects before placing them in the drawing. Any ideas? Thank you VvierA
  24. I totally agree with the concept of core modeling. The advanced parametric tools do not work for us ever since. The settings are either too complex or too simple. They never really fit. Even the 'wall'-tool is both too complicated and too limited. However there are huge improvements for 3d modeling. And there is still potential for further improvements to simplify the workflow and reduce the number of clicks for certain processes. I would love to see Nemetschek US to focus on improving the workflows and the user interface of core 3d modeling and to evolve the concept of 'marionette'. In combination with as strong database concept this would be a very powerful tool, that might be capable to make parametric tools completely redundant.
  25. vectorlab.info was once a very good for all info and resources about Vectorscript. Now the site doesn't work anymore. Does anybody know if they're moved or closed down?
×
×
  • Create New...