Jump to content

Hippocode

Member
  • Posts

    796
  • Joined

  • Last visited

Posts posted by Hippocode

  1. How did you make that marker digitalmechanics? You mentioned the Extensio Pro Plug-in earlier but that is for piping as far as I can see.

    We offer 2 packages, Extensio and Extensio Pro.

    The object he used is the SymbolObject, which is present in both bundles.

    You can find more about it here .

  2. How did you get them on the 3D plane ??? I've tried everything without result.

    Also, I don't have the mode "show as 2D graphic only" which probably makes it work for you. I can't get rid of the 3D locus, thus it remains hybrid.

    EDIT, found it. Badly badly translated into Dutch.

  3. Well, the piping plug-in can be used for any kind if pipe but has no auto dimensioning associated with it.

    The drainage is derived from the piping tool which has a calculation for indoor sewerage. I will add some more information about the calculation method in the MEP manual prior to the new release.

    If there is something specific you need give me a shout. In fact, the new update features about 90% of user requested changes!

  4. By dimension I mean I would like it to show the overall height, width, and depth of the object/bounding box.

    I just want it displayed, not something that can be edited. however if the object inside the symbol is altered and changes size in any way, the display should update the dimensions of the bounding box.

    I unfortunately have no idea how to write script. I would be willing to learn, but we have too much production work to do to spend that kind of time on this particular project.

    Any further suggestions or recommendations would be appreciated. Thank you!

    If you want to keep it simple, a script just gets the 3D bounding box of your symbol definition and stores these dimensions somewhere, preferable a record attached to the symbol definition. This allows you to retrieve these values as well in a worksheet.

    If you modify a symbol definition, there is no way to have it automatically update. You would need to run the script again.

    There are several ways of displaying this data inside your drawing if that is also what you are after:

    - Edit you symbol definition to show the record fields attached to a text field.

    - Let the script just print a text field next to each symbol.

    - A custom label object, probably not what you are after.

    There are several coding examples to be found under the vectorscript / python section. If you don't want/can spend the time you can always ask for someone to do it for you, might be at a small cost :)

  5. Is there a time efficient way of getting symbols to display this information in the Object Info Palette?

    What exactly defines the dimensions ? Just the bounding box of the symbol ? Some inner content of the symbol ? Can it retrieved the same way for all symbols ?

    You could just have a script, to iterate all your symbol definitions, find the bounding box and save it into an attached record, or even the symbol name.

  6. 1) Yes. I believe everything is being converted into a NURBS, even a 3D polygon.

    2) This has to do with 2 things:

    - Not all planar objects are PATH based, for instance a rectangle.

    - The EAP default behavior just turns anything into a NURBS, but there is a workaround:

    Create your own object that creates internally an EAP just by passing the path and the profile. This way, you have more control of your path :)

  7. What information are you privileged too :-) that allows you to know that 12255 is an init/setup? Where does the average person find this help?

    VS is derived from the Vectorworks SDK for programming in C++. If you download the SDK and search for "minicad" in the file names, those files hold ALL the constants vectorworks uses, for instances for events of dialogs, plug-ins etc etc

  8. After taking a quick look at the VS function reference, there is a section for "tool events". So it might be possible after all :)

    Note that you need to create the hovering part on your own. This is what I use for one of my tools in the SDK.

    It will highlight any object compared with an array of object names.

    void CMEPLabelToolDef_EventSink::MouseMove()
    {
       if(this->GetToolPointsCount() == 0)
       {
           MCObjectHandle OverObject;
           short OverPart;
           SintptrT Code;
    
           gSDK->TrackTool(OverObject, OverPart, Code);
           if(OverObject != NULL)
           {
               //if(OverObject != Object)
               {
                   gSDK->EmptyToolHighlightingList();
                   if(VWParametricObj::IsParametricObject(OverObject))
                   {
                       VWParametricObj Obj(OverObject);
                       TXString ObjName = Obj.GetParametricName();
    
                       // Valid object ?
                       if(std::find(fTaggableObjects.begin(),fTaggableObjects.end(),ObjName) != fTaggableObjects.end())
                       {
                           HighLightedObject = OverObject;
                           gSDK->AddToolHighlightingObject(HighLightedObject);
                       }
                       else if(std::find(fTaggableGroupObjects.begin(),fTaggableGroupObjects.end(),ObjName) != fTaggableGroupObjects.end())
                       {
                           HighLightedObject = OverObject;
                           gSDK->AddToolHighlightingObject(HighLightedObject);
                       }
                   }
               }
           }
           else
           {
               if(HighLightedObject != NULL)
               {
                   gSDK->EmptyToolHighlightingList();
                   HighLightedObject = NULL;
               }
           }
       }
    
       //return VWToolDefault_EventSink::MouseMove();
    }

  9. I'm not sure this is possible with VS.

    What you need to do is to overwrite the tool behavior, particularly the mouse move and click events.

    If there is no way of overwriting the tool, you might do it with a menu command instead or object event:

    http://developer.vectorworks.net/index.php/VS:vstGetPickObject

    You could trigger this by a button in the OIP.

    I do exactly what you describe for a custom tool myself, but it's made with the SDK so I have no idea how to do this in vectorscript.

  10. 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.

    You don't need the tool, ok.

    But the thing is, when creating a plug-in with VS, VW will automatically create a tool for it so you can place it in the drawing. Luckily for you you don't need to code that tool which leaves you to the object only. That is why you need to choose the plug-in type (2Dpoint, rectangle, polygon....)

    If you use the SDK, you can keep this separate. I've got several objects that don't have a tool because other objects / tools place them in the drawing.

    That being said, a tool or not, the only way to add an object this way is trough CreateCustomObject. This won't trigger the tool btw.

  11. 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.

    The only solution you have is what I've highlighted. You can't aspect VW to generate an object for you from scratch, without knowing what it should do. This is something you need to set up.

  12. What you are trying to do is possible, but I believe you don't understand what a plug-in object is.

    You need to DEFINE a custom plug-in object, that takes a symbol or easier, a symbol name so it can generate it on resetting. This is something you can't do automatically, its coding work to do ;)

    With your menu command, you search the poly you wish to label, then call CreateCustomObject to CREATE an instance of your custom object, bound to the polygon you have a handle on.

  13. 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

    Well, just use CreateCustomObject or the equivalent for path based objects.

    What you then pass as parameters or content depends on your plug-in.

    You can for instance use the symbol name in a parameter of the object or maybe your object requires a symbol in the path/profile group etc etc...

    Also keep in mind that you will need to use the offset of the symbol as insertionpoint of your object. Depending on your needs, rotations about axises as well.

  14. 1) When you create a report, you can choose to show only selected objects by modifying the criteria.

    2) If you have objects selected, there is no "command" available to turn this selection into a report. If you did create your report as mentioned in step 1 you can relalculate it to show your new selection.

×
×
  • Create New...