query regarding model and layout view
query regarding model and layout view
hi all,
i have a drawing which is opened in acad 2000. in acad 2000, there are 2 view: 1. model view, and layout view.
i have tested this drawing in odamfcapp example, there when i turn off all the layers except $polyline_sp, i am getting a bounded rectangle. i have implemented a functionality for getting the handles of the polyline when the mouse is clicked inside a polyline. but due to this border, i cant perform the check. why is it so..?
when i open the drawing in acad 200 and when i switch it to model view, there seems to be no border..
i need to know how this can be achieved. (only viewing model view).. so that i can perform the select operation..
tia
thanks & regards,
rajesh parameswaran
rajuinnet
# 30th october 2004, 01:42 am
registered user join date: jul 2004
location: india
posts: 82
oddbpolyline::getpointat()
oddbpolyline::getpointat()
hi all,
i found that the oddbpolyline::getpointat() seems to be giving wrong coordinates...
i need to get all the coordinates for a oddbpolyline entity, for performing the point in polyline...
help needed..!!
tia
thanks & regards,
rajesh parameswaran
rajuinnet
# 30th october 2004, 01:55 am
registered user join date: jul 2004
location: india
posts: 82
opening drawing in model space
hi all,
i found that the drawing file is opening in paper space. can i know how to open a drawing and view it in model space .?
in the odamfcapp also, the drawing is opening in paper space..
tia
thanks & regards,
rajesh parameswaran
rajuinnet
# 1st november 2004, 01:08 am
softdev join date: jun 2002
location: st'petersburg, russia
posts: 522
odamfcapp has command "set active layout" (view/set active layout). it is implemented by function codamfcappdoc:
nviewsetactivelayout (file odamfcappdoc.cpp). this is a sample of setting active layout (it uses method oddbdatabase::setcurrentlayout).
also there are methods oddbdatabase::findactivelayout() and oddbdatabase::gettilemode(), which can help with getting active layout. oddbdatabase::gettilemode() returns true if model space is active.
sincerely yours,
george udov
george udov
# 1st november 2004, 03:56 am
registered user join date: jul 2004
location: india
posts: 82
hi george,
i found that when a drawing is opened in model space, we use the getactiveview(), like the below one.
odgsview* ctest1view::getactiveview()
{
return m_pdevice->viewat(0);
}
but when a drawing is opened in paper space, then the above function, is modified as
odgsview* ctest1view::getactiveview()
{
return m_pdevice->viewat(1);
}
then i'm getting the model space.
i can see the paper space entities, even when i open a drawing (saved in the paper space view). i don't want to see the paper space entities.'
help needed..!! to open drawing and display only model space entities, even if the entities are saved in paper space view..
tia
thanks & regards,
rajesh parameswaran
rajuinnet
# 1st november 2004, 04:15 am
registered user join date: jul 2004
location: india
posts: 82
hi george,
i found a solution for the view port problem, can u tell me whether i am doing in the right way..
here is the code snippet from the file open function..
try
{
theapp.m_pdb = theapp.readfile(filenameue, 0 );
if (!theapp.m_pdb->gettilemode())
{
theapp.m_pdb->setcurrentlayout("model");
}
}
catch (oderror& err)
{
str = theapp.geterrordescription(err.code()).c_str();
messagebox(str);
return;
}
catch(...)
{
messagebox ("unknown error");
return;
}
tia
thanks & regards,
rajesh parameswaran
rajuinnet
# 1st november 2004, 11:34 pm
softdev join date: jun 2002
location: st'petersburg, russia
posts: 522
you're going in the right way.
sincerely yours,
george udov
george udov
# 2nd november 2004, 02:36 am
registered user join date: jul 2004
location: india
posts: 82
quote:
originally posted by george udov
you're going in the right way.
hi george,
thank you for your reply..
thanks & regards,
rajesh parameswaran
rajuinnet
none
? | ?
thread tools
display modes
linear mode
search this thread
rate this thread
excellent
good
average
bad
terrible
posting rules
you may post new threads
you may post replies
you may post attachments
you may edit your posts
is on
are on
code is off
html code is off
forum jump
user control panel private messages subscriptions who's online search forums forums home general topics news questions and remarks business issues industry commentary general software issues documentation issues future directions dwg libraries dwgdirect.net dwgdirect, c++ version dwgdirectx, activex version adtdirect/c3ddirect opendwg toolkit/viewkit dgn libraries dgndirect, c++ version (2.x+) dgndirect libraries (legacy 0.99xx)
all times are gmt -7. the time now is 12:45 amfff">.
- - -
copyright ?2000 - 2009, jelsoft enterprises ltd.
copyright 1998-2008 open design alliance inc.
oddbpolyline::getpointat()
oddbpolyline::getpointat()
hi all,
i found that the oddbpolyline::getpointat() seems to be giving wrong coordinates...
i need to get all the coordinates for a oddbpolyline entity, for performing the point in polyline...
help needed..!!
tia
thanks & regards,
rajesh parameswaran
opening drawing in model space
hi all,
i found that the drawing file is opening in paper space. can i know how to open a drawing and view it in model space .?
in the odamfcapp also, the drawing is opening in paper space..
tia
thanks & regards,
rajesh parameswaran
odamfcapp has command "set active layout" (view/set active layout). it is implemented by function codamfcappdoc:
nviewsetactivelayout (file odamfcappdoc.cpp). this is a sample of setting active layout (it uses method oddbdatabase::setcurrentlayout).
also there are methods oddbdatabase::findactivelayout() and oddbdatabase::gettilemode(), which can help with getting active layout. oddbdatabase::gettilemode() returns true if model space is active.
sincerely yours,
george udov
hi george,
i found that when a drawing is opened in model space, we use the getactiveview(), like the below one.
odgsview* ctest1view::getactiveview()
{
return m_pdevice->viewat(0);
}
but when a drawing is opened in paper space, then the above function, is modified as
odgsview* ctest1view::getactiveview()
{
return m_pdevice->viewat(1);
}
then i'm getting the model space.
i can see the paper space entities, even when i open a drawing (saved in the paper space view). i don't want to see the paper space entities.'
help needed..!! to open drawing and display only model space entities, even if the entities are saved in paper space view..
tia
thanks & regards,
rajesh parameswaran
hi george,
i found a solution for the view port problem, can u tell me whether i am doing in the right way..
here is the code snippet from the file open function..
try
{
theapp.m_pdb = theapp.readfile(filenameue, 0 );
if (!theapp.m_pdb->gettilemode())
{
theapp.m_pdb->setcurrentlayout("model");
}
}
catch (oderror& err)
{
str = theapp.geterrordescription(err.code()).c_str();
messagebox(str);
return;
}
catch(...)
{
messagebox ("unknown error");
return;
}
tia
thanks & regards,
rajesh parameswaran
you're going in the right way.
sincerely yours,
george udov
quote:
originally posted by george udov
you're going in the right way.
hi george,
thank you for your reply..
thanks & regards,
rajesh parameswaran