Jump to content

PatW

Member
  • Content Count

    24
  • Joined

  • Last visited

Community Reputation

11 Good

1 Follower

About PatW

  • Rank
    Greenhorn

Personal Information

  • Location
    Germany

Recent Profile Visitors

521 profile views
  1. PatW

    VWStaticTextCtrl SetColor

    We are using VW2020. auto statTX = GetStaticTextCtrlByID(kedtitDim_EffLengthBasket); Uint8 R = 255; Uint8 G = 0; Uint8 B = 0; CRGBColor color(R, G, B); statTX->SetColor(color, false /*atDialogInitTime*/ ); I was calling this in DispatchEvent and OnUpdateUI without any effect. What we want is to make the static text red dynamically when a value is invalid.
  2. I was not able to change the color with this funciton(also SetStyle is not working) is there any trick or alternative function?
  3. The defined params are stored in the ParamRecord which has the name off the ParamObjectType. First you need to get the param rec name, thats saver than hardcoding it: http://developer.vectorworks.net/index.php/VS:GetParametricRecord Put the handle in this function: http://developer.vectorworks.net/index.php/VS:GetName At the end you pass the paramObject, the name off the param record and the Fieldname into this function: http://developer.vectorworks.net/index.php/VS:GetRField
  4. VS function's throw no exceptions. The errors are basically prints. You can check a handle like a boolean to see if its valid: if not vs.GetObject(SymName): # XXX error # If another obj type could have the name this might be saver: kSymbol_Definition = 16 h = vs.GetObject(SymName) if (vs.GetTypeN(h) != kSymbol_Definition): # XXX error
  5. ForEachObjectInList needs a callback function you can do the selection inside there instead off looping a list. Theres a good example on: http://developer.vectorworks.net/index.php/VS:ForEachObjectInList regards, Patrick
  6. Hi CETLV, are definitely only the objects that we see on the picture in the drawing? When calculating "All" Braceworks consideres also objects that are hidden. I would take a look into the file if you can share it.
  7. The windows equivalent to AppleScript would be ActiveX here: Unfortunately it's not documented and very unstable. If you are lucky it will work.
  8. You need to provide the internal plug-in name, usualy this is the name that you see in the OIP. To get the definite name use this little script (Python): # Example obj must be selected hRec = vs.GetParametricRecord(vs.FSActLayer()) print (vs.GetName(hRec ))
  9. Hi Patrick, with these commands you should be able to do the job. They should be also available as Marionette nodes. Otherwise you can create them. http://developer.vectorworks.net/index.php/VS:Function_Reference CreateCustomObject(objectName, p, rotationAngle) SetCustomObjectPath(); The params can be modified with: GetParametricRecord SetRField
  10. Hi MTRobin, you could invoke the menu comand "Save copy as..." by http://developer.vectorworks.net/index.php/VS:DoMenuTextByName
  11. Hi, as I know there is no way to get Events with VectorScript so it will not be possible to trigger your PIO when a symbol changes. In the SDK you would create a class that inherits from VCOMImmediateImpl<IObjUpdateSupport> to catch global events. class UpdateSupportProvider : public VCOMImmediateImpl<IObjUpdateSupport> { public: UpdateSupportProvider(CallBackPtr); virtual ~UpdateSupportProvider(); // IObjUpdateSupport public: virtual void VCOM_CALLTYPE Init(IObjUpdateSupportContext* pContext); virtual void VCOM_CALLTYPE OnNotification(IObjUpdateSupportContext* pContext); virtual void VCOM_CALLTYPE OnState(IObjUpdateSupportContext* pContext, const ObjectState& state); ...
  12. Hello, maybe you simply forgaot the "namespace" try this: import random print ( random.randrange (0, 500, 3) )
  13. You could look if there es a selector to call the menu command: See:
  14. def vs.Poly(p): return None Poly is not returning tha handle 😉 Look for the function LastCreatedObj or similiar to get the handle. Edit: To slow. But one addition if you want to make sure that LNewObj is giving you the right obj you can first execute LNewObj save the handle then create the poly, do LNewObj again and check if the result is not the same as from the first call.
  15. As a test I created a WorldBased and a PageBased Symbol next to each other. When the Design-Layerscale is changed the size relations of the two symbols change as expected. (At some scale Smybol A is bigger at another Symbol B is bigger.) But when this syms are both in the viewport and I changed the Viewport layerscale the whole scene simply gets bigger or smaller and the relations stays the same. So in this case the PageBasedSym is not behaving different. Maybe you meant something else.

 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×
×
  • Create New...