Features

Download

Online

Gallery

Blog

  Index  | Recent Threads  | List Attachments  | Help  | Search
 Welcome Guest  |  Register  |  Login
Login Name  Password
 

Sweet Home 3D Forum



No member browsing this thread
Thread Status: Active
Total posts in this thread: 2
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 3599 times and has 1 reply Next Thread
wilk2002
Newbie




Joined: Aug 13, 2015
Post Count: 1
Status: Offline
Reply to this Post  Reply with Quote 
How to get PlanComponent from Plug-in ?

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 ?
[Aug 13, 2015 11:13:40 AM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 5837
Status: Offline
Reply to this Post  Reply with Quote 
Re: How to get PlanComponent from Plug-in ?

You can access to MultipleLevelsPlanPanel instance with:
getHomeController().getPlanController().getView()
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.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Aug 14, 2015 3:43:23 AM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest    http://www.eteks.com [Link] Report threatening or abusive post: please login first  Go to top 
[ Jump to Last Post ]
Show Printable Version of Thread  Post new Thread

    Get Sweet Home 3D at SourceForge.net. Fast, secure and Free Open Source software downloads
   
© Copyright 2006-2017 eTeks - All rights reserved