Jump to content

Hello Community!

This Saturday, April 11, from 9am – 1pm EDT we will be performing maintenance on the Vectorworks Community Board. During this time, the site will be unavailable.


  • Content Count

  • Joined

  • Last visited

Community Reputation

15 Good


About Hippocode

  • Rank
    500 Club

Personal Information

  • Location

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. If they are also "outside" the container of your PIO, so not part of it, you need to attach them to the PIO's container after duplication.
  2. Couldn't find any constant to read that property in the minicads file. I vagely remember when building lists the filename was used as prefix or something similar but that would require you to build a huge list of all available resources, which is still a valid possibility. From looking at this article, one of the other similar functions will probably return the filename within the symbolname if from an external file, but it might only work if those are duplicate: http://developer.vectorworks.net/index.php/VS:GetActualNameFromResourceList You could also try using the IResourceManagerContent VCOM interface to search for the specific symbols, maybe some of the functions also return the filename.
  3. I faced a similar issue trying to find out if some of my custom plug-ins were referenced or not. I used the following approach which seemed to work as the "IsObjectFromReferencedFile" function didn't (always) return the expected results you can just look at the object's layer name instead. // Referenced? fInfo.IsReferenced = gSDK->IsObjectFromReferencedFile(this->GetThisObject()) || gSDK->IsViewportGroupContainedObject(this->GetThisObject(), kViewportGroupCrop); // Since above doesn't work :( MCObjectHandle hLayer = this->GetParentLayer(); if(hLayer && VWLayerObj::IsLayerObject(hLayer)) { VWLayerObj L(hLayer); TXString strLevel = L.GetName(); fInfo.IsReferenced = strLevel.Find("NNA") != -1; // NNA seems to be put in all referenced layers, so any object that is referenced matches this parent layer name. }
  4. I can provide you with some other samples if you need some. They come in handy sometimes, the benefit is that such a tiny script has access to your complete SDK. If you have SDK bases plug-ins you can use this to make certain data or functionality accessible through VS. I have made several of those for my plug-ins. e.g.: The ability to activate our license to use our software for the current session, bypassing our default activation method. It requires a custom hash to unlock the current specific day.
  5. Using the plug-in manager to install the plug-in did work, thank you for the suggestions. I'm a bit surprised this works but manually installing doesn't. Maybe Vectorworks removes the quarantaine of the file while copying.
  6. I removed the quarantaine of the buildvwr tool instead of disabling scrutil so I can see the error messages myself. Signing alone doesn't do it and I'm unable to create an archive of the plugin in order to get it notarised (Also tried it on the TesterModule sample). Has anyone done this before? I'll see if I can do it manually using terminal instead.
  7. All of them as zipped files (download available on a website or Google Drive). Some bundles support the third party plug-in installer within Vectorworks, which requires the files to be zipped. I also zip them because some browsers/cloud solutions rename extensions and capital letters in the VWR resource on download/zip which breaks the plug-in. I can't really imagine doing this without these files being zipped 😮
  8. Thanks, this helped me out on the developer side. But clients are now reporting Vectorworks prevents them of using the plug-in because of restrictions obviously... Do we need to modify some settings of our projects for them to be accepted somehow?
  9. Hi There is not much to be done, as most of it should be handled by the default implementation. I use a custom class (VWStyledParametricObj) to help with this which I attached (had to zip it as the file extensions weren't allowed). This class also holds some comments on what each action is for. This is an example of how I implemented it: EObjectEvent ElectricalDevice_EventSink::OnEditPluginStyle(MCObjectHandle symDefHandle) { return VWStyledParametricObj::OnEditPluginStyle_Default(symDefHandle); } EObjectEvent ElectricalDevice_EventSink::OnCreatePluginStyle(MCObjectHandle symDefHandle) { return VWStyledParametricObj::OnCreatePluginStyle_Default(symDefHandle); } EObjectEvent ElectricalDevice_EventSink::OnUpdateStyledObject(MCObjectHandle symDefHandle) { // Copy over the saved references... EPluginStyleParameter ParameterStyle = gSDK->GetPluginStyleParameterType(fhObject, "__ManageOperatingAreas"); if(ParameterStyle == kPluginStyleParameter_ByStyle) { VWSymbolDefObj symDef(symDefHandle); MCObjectHandle hObject = symDef.GetFirstMemberObject(); if(hObject && VWDeviceObj::GetDeviceType(hObject) != eDeviceType::kUnkownDevice) { sOperatingAreaArray Areas; OperatingArea::Get(hObject, Areas); OperatingArea::Save(fhObject, Areas); } } return VWStyledParametricObj::OnUpdateStyledObject_Default(symDefHandle); } EObjectEvent ElectricalDevice_EventSink::OnFinalizeCreatePluginStyle(MCObjectHandle symDefHandle) { /*EObjectEvent Result =*/ VWStyledParametricObj::OnFinalizeCreatePluginStyle(symDefHandle, VWDeviceObj::GetStyleMap()); return VWStyledParametricObj::OnFinalizeCreatePluginStyle_Default(symDefHandle); } EObjectEvent ElectricalDevice_EventSink::OnFinalizeUpdateStyledObject(MCObjectHandle symDefHandle) { return VWStyledParametricObj::OnFinalizeUpdateStyledObject_Default(symDefHandle); } StyledPlugins.zip
  10. I believe this does sort of the same, but only on the visible part of the screen instead of all objects: void Utility::RefreshView() { WorldCoord perspectiveDistance, clipDistance; WorldRect clipRect; gSDK->GetPerspectiveInfo(gSDK->GetActiveLayer(), perspectiveDistance, clipDistance, clipRect); gSDK->RedrawRect(clipRect); } Also, I tend to draw all temporarily objects using these two functions on these events: void X_EventSink::DoSetDown(bool bRestore, const IToolModeBarInitProvider* pModeBarInitProvider) { this->ClearAllToolInteractiveObjects(); } void X_EventSink::MouseMove() { this->UpdateToolInteractiveObjects(); } void X_EventSink::ClearAllToolInteractiveObjects() { VectorWorks::IToolInteractiveDrawPtr toolInteractive; gSDK->GetCurrToolInteractiveDraw( & toolInteractive ); if (toolInteractive) { toolInteractive->ClearObjects(); } } void X_EventSink::UpdateToolInteractiveObjects() { VectorWorks::IToolInteractiveDrawPtr toolInteractive; gSDK->GetCurrToolInteractiveDraw( & toolInteractive ); if ( toolInteractive ) { size_t ptCnt = this->GetToolPointsCount(); if ( ptCnt > 0 ) { // Create full path VWPolygon3D poly; for(size_t i=0; i < ptCnt; i++) { poly.AddVertex(this->GetToolPt3D(i)); } VWPoint3D MousePosition; this->GetToolPtCurren3D( MousePosition ); poly.AddVertex(MousePosition); if((fModeBarState[ModeGroup::Mode_H_Outline] != eHAlign::kHAlign_Center) || (fModeBarState[ModeGroup::Mode_V_Outline] != eVAlign::kVAlign_Center) || fSlope != 0) { eHAlign HAlign = static_cast<eHAlign>(fModeBarState[ModeGroup::Mode_H_Outline]); eVAlign VAlign = static_cast<eVAlign>(fModeBarState[ModeGroup::Mode_V_Outline]); poly = MathUtilsExt::GenerateOffsetPolygon(poly, HAlign, fH_Offset, VAlign, fV_Offset, fSlope); } VWPolygon3DObj polyObj( toolInteractive->GetObject( qPolyNode ) ); polyObj.SetPolygon(poly); } } }
  11. How do we properly support IFC mapping for our custom objects? - Do we need to add default mapping sets on document open? I noticed that the default mapping dialog only shows native objects. - Do we need to handle the mapping ourselves or is it done by Vectorworks on export? Is there a specific event triggered to apply the mapping or should we just do it in the Recalculate event?
  12. Assuming this won't happen anytime soon... this could be solved by a simple script that lets you filter your selection, by choosing one of the records attached to your selection from a drop down menu.
  13. Is this VS or the SDK? Where are you filling the drop down? I don't have this issue with the SDK. It might be the location/event where you fill the dropdown?
  14. Any component that can be hosted into a wall is actually being duplicated inside while the original is removed. This sounds very unlogical but I don't know the reason behind it. That might be causing that row being removed.
  15. I don't think there is a function available that can do it, as it's default behaviour. I believe the only way is to force a class (or custom settings) on your subobjects. My guess is that the recalculate event uses the parent class for all created content in that container.


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