Dear SweetHome community,
I'm trying to extract home plan top view into PNG files but knowing what is the scale. So knowing that for instance 1cm is 1px etc. I searched API and found that I could try somehow got to my aim through SVG extract. So I could extract SVG in plug-in and then try to convert to PNG file knowing rooms dimensions etc.
BUT, to get SVN extract I have to get PlanComponent object first and according to JavaDoc it is only returned from MultipleLevelsPlanPanel.createPlanComponent method. Which doesn't look like the right one to use once the view is already created.
Could you please help me and advice how may I export SVG file from inside the plug-in ?
How to get PlanComponent from Plug-in ?
This topic has been viewed 7363 times and has 1 replies
Re: How to get PlanComponent from Plug-in ?
You can access to MultipleLevelsPlanPanel instance with: but this won't help you because there's no way to export to SVG from this component.
I would suggest to create a PlanComponent instance and call exportToSVG or getClipboardImage on it like actual implementation of the matching menu.
Code: Select all
getHomeController().getPlanController().getView()I would suggest to create a PlanComponent instance and call exportToSVG or getClipboardImage on it like actual implementation of the matching menu.
Emmanuel Puybaret, Sweet Home 3D creator
Who is online
Users browsing this forum: No registered users and 1 guest